/* Edit Profile Modal Styles */

.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 6, 10, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.profile-modal {
    background: rgba(5, 6, 10, 0.95);
    border-radius: 24px;
    border: 1px solid rgba(224, 235, 243, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.profile-modal-overlay.active .profile-modal {
    transform: translateY(0) scale(1);
}

.profile-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(224, 235, 243, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0;
    background: linear-gradient(135deg, var(--grad-new-start), var(--grad-new-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.profile-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.profile-modal-body {
    padding: 2rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.profile-form-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.profile-form-group.full-width {
    grid-column: 1 / -1;
}

.profile-form-group label {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-form-group input,
.profile-form-group textarea,
.profile-form-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(224, 235, 243, 0.15);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'Syne', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.profile-form-group input:focus,
.profile-form-group textarea:focus,
.profile-form-group select:focus {
    outline: none;
    border-color: var(--grad-new-end);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(224, 235, 243, 0.1);
}

.profile-form-group input::placeholder,
.profile-form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.profile-form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Syne', sans-serif;
    line-height: 1.6;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(224, 235, 243, 0.08);
    margin-bottom: 1rem;
}

.profile-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--grad-new-start), var(--grad-new-end));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 700;
    border: 3px solid rgba(224, 235, 243, 0.2);
    position: relative;
    overflow: hidden;
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar-info {
    flex: 1;
}

.profile-avatar-info h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.profile-avatar-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.profile-avatar-upload {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.profile-avatar-upload input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.profile-upload-btn {
    background: linear-gradient(135deg, var(--grad-new-start), var(--grad-new-end));
    color: var(--text-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 235, 243, 0.3);
}

.profile-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 0 2rem 2rem;
    border-top: 1px solid rgba(224, 235, 243, 0.08);
    margin-top: 1rem;
}

.profile-btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    font-family: 'Syne', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.profile-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(224, 235, 243, 0.15);
}

.profile-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.profile-btn-save {
    background: linear-gradient(135deg, var(--grad-new-start), var(--grad-new-end));
    color: var(--text-color);
}

.profile-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 235, 243, 0.3);
}

.profile-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Success/Error message styling */
.profile-message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.profile-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.profile-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

.profile-message.show {
    display: flex;
}

/* Responsive design */
@media (max-width: 768px) {
    .profile-modal {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }
    
    .profile-modal-header,
    .profile-modal-body {
        padding: 1.5rem;
    }
    
    .profile-modal-actions {
        padding: 0 1.5rem 1.5rem;
        flex-direction: column;
    }
    
    .profile-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .profile-avatar-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-modal-title {
        font-size: 1.5rem;
    }
    
    .profile-btn {
        width: 100%;
    }
}

/* Animation for modal entrance */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.profile-modal-overlay.active .profile-modal {
    animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* OAuth Connection Cards */
.oauth-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.oauth-card {
    background: linear-gradient(135deg, rgba(10, 15, 25, 0.6) 0%, rgba(15, 20, 30, 0.6) 100%);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.oauth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.oauth-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.oauth-card:hover::before {
    opacity: 1;
}

.oauth-card.connected {
    border-color: rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, rgba(10, 25, 15, 0.6) 0%, rgba(15, 30, 20, 0.6) 100%);
}

.oauth-card.connected::before {
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.5), transparent);
}

.oauth-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.oauth-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.oauth-card-icon svg {
    width: 24px;
    height: 24px;
}

.discord-icon {
    background: rgba(88, 101, 242, 0.15);
    color: #5865F2;
}

.oauth-card:hover .discord-icon {
    background: rgba(88, 101, 242, 0.25);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.3);
}

.twitter-icon {
    background: rgba(29, 161, 242, 0.15);
    color: #1DA1F2;
}

.oauth-card:hover .twitter-icon {
    background: rgba(29, 161, 242, 0.25);
    box-shadow: 0 0 20px rgba(29, 161, 242, 0.3);
}

.youtube-icon {
    background: rgba(255, 0, 0, 0.15);
    color: #FF0000;
}

.oauth-card:hover .youtube-icon {
    background: rgba(255, 0, 0, 0.25);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.twitch-icon {
    background: rgba(145, 70, 255, 0.15);
    color: #9146FF;
}

.oauth-card:hover .twitch-icon {
    background: rgba(145, 70, 255, 0.25);
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.3);
}

.oauth-card-info {
    flex: 1;
}

.oauth-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
}

.oauth-card-status {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    transition: color 0.3s ease;
}

.oauth-card.connected .oauth-card-status {
    color: #22c55e;
    font-weight: 600;
}

.oauth-connect-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.oauth-connect-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.oauth-connect-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.3) 100%);
    border-color: rgba(59, 130, 246, 0.6);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.oauth-connect-btn:hover::before {
    width: 300px;
    height: 300px;
}

.oauth-connect-btn:active {
    transform: translateY(0);
}

.oauth-card.connected .oauth-connect-btn {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.2) 100%);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.oauth-card.connected .oauth-connect-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .oauth-cards-grid {
        grid-template-columns: 1fr;
    }
}