/* Account Management Page Styles */

.account-section {
    min-height: 100vh;
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.account-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Account Header */
.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(100, 149, 237, 0.2);
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 24px;
}

.account-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-blue);
    position: relative;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
}

.account-info h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: #fff;
    margin: 0 8px 8px 0;
    font-weight: 700;
    display: inline-block;
}

.account-role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-purple));
    color: white;
    margin-left: 8px;
}

.account-email {
    color: rgba(255, 255, 255, 0.6);
    margin: 4px 0;
    font-size: 0.95rem;
}

.account-member-since {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 8px 0 0 0;
}

/* Account Section Cards */
.account-section-card {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(100, 149, 237, 0.2);
    padding: 30px;
    margin-bottom: 24px;
}

.card-header {
    margin-bottom: 24px;
}

.card-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    margin: 0 0 8px 0;
}

.card-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    color: #fff;
    margin: 0 0 8px 0;
}

.card-header p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.95rem;
}

/* Linked Accounts Grid */
.linked-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.linked-account-item {
    background: rgba(10, 10, 10, 0.6);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(100, 149, 237, 0.15);
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    overflow: hidden;
}

.linked-account-item:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(100, 149, 237, 0.2);
}

.linked-account-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0; /* Allow flex item to shrink */
    overflow: hidden;
}

.linked-account-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(100, 149, 237, 0.1);
    border: 2px solid rgba(100, 149, 237, 0.3);
}

.linked-account-icon img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.linked-account-details h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.linked-account-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.linked-account-status.linked {
    background: rgba(0, 255, 0, 0.2);
    color: #0f0;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.linked-account-status.not-linked {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.linked-account-username {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 4px 0 0 0;
}

.linked-account-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.linked-account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(26, 26, 46, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(100, 149, 237, 0.2);
    gap: 16px;
}

.linked-account-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0; /* Allow flex item to shrink */
}

.linked-account-actions .btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    min-width: fit-content;
    font-weight: 500 !important;
    line-height: 1.2;
    height: auto !important;
    min-height: auto !important;
}

.linked-account-actions .btn-primary,
.linked-account-actions .btn-secondary {
    padding: 6px 12px !important;
    font-size: 0.75rem !important;
    height: auto !important;
}

.linked-account-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.linked-account-details h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .linked-account-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .linked-account-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .linked-account-actions .btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Account Stats Grid */
.account-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: var(--primary-blue);
    margin: 16px 0 8px 0;
    font-weight: 900;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 12px 0;
}

.stat-link {
    display: inline-block;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.stat-link:hover {
    color: var(--accent-purple);
}

/* Account Settings */
.account-settings {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(10, 10, 10, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(100, 149, 237, 0.1);
}

.setting-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: #fff;
    margin: 0 0 4px 0;
}

.setting-info p {
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    font-size: 0.85rem;
}

.setting-value {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.setting-value code {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(100, 149, 237, 0.2);
}

.btn-icon {
    background: transparent;
    border: 1px solid rgba(100, 149, 237, 0.3);
    color: var(--primary-blue);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(100, 149, 237, 0.1);
    border-color: var(--primary-blue);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
}

/* Auth Prompt */
.auth-prompt {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
}

.auth-prompt-content {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(100, 149, 237, 0.2);
    padding: 60px 40px;
}

.auth-prompt-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: #fff;
    margin: 0 0 16px 0;
}

.auth-prompt-content p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 32px 0;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .account-header {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .account-profile {
        flex-direction: column;
    }

    .account-info h1 {
        font-size: 1.5rem;
    }

    .linked-accounts-grid {
        grid-template-columns: 1fr;
    }

    .linked-account-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .linked-account-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .linked-account-actions .btn {
        flex: 1;
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .setting-value {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .account-section {
        padding: 100px 15px 40px;
    }

    .account-section-card {
        padding: 20px;
    }

    .account-stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 2.5rem;
    }
}

