/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f7;
    min-height: 100vh;
    line-height: 1.6;
    color: #1d1d1f;
}

/* Login page styles with background image */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url('/static/images/top_kv.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo img {
    max-width: 200px;
    height: auto;
}

.login-box h1 {
    text-align: center;
    color: #1a1a1a;
    margin-bottom: 35px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.error-message {
    background: #f5f5f7;
    color: #1d1d1f;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #ff3b30;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1d1d1f;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007aff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.required-mark {
    color: #c62828;
    font-weight: 700;
}

/* Apple-style buttons */
.login-btn {
    width: 100%;
    padding: 16px;
    background: #6e6e73;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
}

.login-btn:hover {
    background: #6e6e73;
}

.login-btn:active {
    transform: scale(0.98);
}

.login-btn i {
    margin-right: 8px;
}


/* Top bar styles */
.top-bar {
    background: #ffffff;
    color: #1d1d1f;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e5e5e7;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.user-info {
    display: flex;
    gap: 24px;
    align-items: center;
}

.user-name {
    font-weight: 600;
    color: #1d1d1f;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.user-score {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 15px;
    /* background removed - set via inline style */
    padding: 6px 14px;
    border-radius: 20px;
}

/* Hamburger menu icon */
.hamburger-menu {
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: transform 0.3s ease;
}

.hamburger-menu:hover {
    transform: scale(1.05);
}

.hamburger-menu .bar {
    width: 28px;
    height: 3px;
    background: #6e6e73;
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Side menu */
.side-menu {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    overflow-x: hidden;
    overflow-y: auto;
    transition: width 0.3s ease;
    padding-top: 60px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.side-menu a {
    padding: 18px 32px;
    text-decoration: none;
    font-size: 16px;
    color: #1d1d1f;
    display: block;
    transition: all 0.2s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.side-menu a:hover {
    color: #007aff;
    background: rgba(0, 122, 255, 0.05);
    border-left-color: #007aff;
}

.side-menu .close-btn {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 42px;
    color: #6e6e73;
    transition: all 0.2s ease;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.side-menu .close-btn:hover {
    color: #007aff;
    transform: scale(1.05);
}

.side-menu.active {
    width: 280px;
}

.menu-user-id {
    padding: 18px 32px;
    font-size: 12px;
    color: #6e6e73;
    border-top: 1px solid #f5f5f5;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Main content */
.main-content {
    padding: 48px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.main-content h1 {
    color: #1d1d1f;
    margin-bottom: 36px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.info-card {
    background: #ffffff;
    padding: 28px 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e7;
    transition: all 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    border-color: #d2d2d7;
}

.info-card h3 {
    color: #6e6e73;
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.info-card p {
    color: #1d1d1f;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Member card page */
.members-card-body {
    background: #f5f5f7;
}

.member-card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 24px;
}

.member-card {
    background: #ffffff;
    width: 100%;
    max-width: 540px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e5e7;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.card-logo-left {
    text-align: left;
}

.card-logo-left img {
    max-width: 120px;
    height: auto;
}

.card-rank {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
}

.card-rank i {
    font-size: 56px;
}

.card-logo {
    text-align: right;
    margin-bottom: 32px;
}

.card-logo img {
    max-width: 160px;
    height: auto;
}

.card-info {
    margin-bottom: 40px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid #f5f5f5;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #6e6e73;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.info-value {
    color: #1d1d1f;
    font-weight: 500;
    font-size: 15px;
}

/* QR Code section */
.qr-code-section {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 24px;
}

.qr-code-image {
    width: 220px;
    height: 220px;
    border: 2px solid #e5e5e7;
    border-radius: 12px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Wallet section */
.wallet-section {
    text-align: center;
    padding: 24px 0;
}

.wallet-icon {
    width: 44px;
    height: 44px;
    margin-right: 12px;
    vertical-align: middle;
}

.wallet-button {
    background: #ffffff;
    border: 2px solid #1d1d1f;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.2px;
}

.wallet-button:hover {
    background: #1d1d1f;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Links and additional elements */
.form-links {
    text-align: center;
    margin-top: 24px;
}

.form-links a {
    color: #007aff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.2s ease;
}

.form-links a:hover {
    color: #0051d5;
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #6e6e73;
    font-size: 13px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #d2d2d7;
}

.divider::before {
    margin-right: 12px;
}

.divider::after {
    margin-left: 12px;
}


/* Responsive design */
@media (max-width: 768px) {
    .login-container {
        background-image: url('/static/images/top_kv_sp.png');
    }
}

.login-box {
    padding: 36px 28px;
    border-radius: 20px;
}

.login-box h1 {
    font-size: 24px;
    margin-bottom: 28px;
}

.top-bar {
    padding: 14px 16px;
}

.user-info {
    gap: 12px;
    font-size: 14px;
}

.user-name,
.user-score {
    font-size: 13px;
}

.user-score {
    padding: 4px 10px;
}

.main-content {
    padding: 32px 16px;
}

.main-content h1 {
    font-size: 26px;
    margin-bottom: 28px;
}

.dashboard {
    grid-template-columns: 1fr;
    gap: 16px;
}

.member-card {
    padding: 28px 20px;
    border-radius: 20px;
}

.card-logo img {
    max-width: 120px;
}

.qr-code-image {
    width: 180px;
    height: 180px;
}

.side-menu.active {
    width: 260px;
}
}

@media (max-width: 480px) {
    .login-box {
        padding: 28px 20px;
    }

    .form-group input,
    .login-btn {
        padding: 12px 14px;
        font-size: 14px;
    }

    .wallet-button {
        padding: 12px 24px;
        font-size: 14px;
    }

    .wallet-icon {
        width: 36px;
        height: 36px;
        margin-right: 8px;
    }
}