/* Custom styles for EDU-S99 */
.crown-icon {
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

.vip-badge {
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.avatar-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.avatar-container:hover .avatar-upload-overlay {
    opacity: 1;
}

.notification-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Tab styles */
.nav-link.active {
    background-color: rgb(55, 65, 81);
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Form improvements */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* Button hover effects */
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Dropdown animations */
.dropdown-enter {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
}

.dropdown-enter-active {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition: all 0.15s ease-out;
}

.dropdown-exit {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.dropdown-exit-active {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
    transition: all 0.1s ease-in;
}

/* Avatar upload section styles */
.avatar-upload-section {
    max-width: 160px;
}

.avatar-preview-container img,
.avatar-preview-container div {
    transition: all 0.3s ease;
}

.avatar-upload-area label:hover {
    background-color: rgba(55, 65, 81, 0.5);
}

.avatar-upload-area label:hover svg,
.avatar-upload-area label:hover span {
    color: #93c5fd;
}

/* Profile form improvements */
.profile-form-container {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.9));
    backdrop-filter: blur(10px);
}

/* Custom file input styling */
input[type="file"]::-webkit-file-upload-button {
    visibility: hidden;
}

input[type="file"]::before {
    content: 'Chọn file';
    display: inline-block;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    outline: none;
    white-space: nowrap;
    cursor: pointer;
    font-weight: 500;
}

input[type="file"]:hover::before {
    background: #4338ca;
}

/* Enhanced form field focus states */
.form-field:focus-within label {
    color: #60a5fa;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* Header Responsive Styles */

/* Ensure mobile menu doesn't interfere with page scrolling */
body.mobile-menu-open {
    overflow: hidden;
}

/* Mobile menu backdrop */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

/* Mobile menu container positioning */
.mobile-menu-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.mobile-homepage-menu {
    max-height: 50vh;
    overflow-y: auto;
}

.mobile-homepage-menu::-webkit-scrollbar {
    width: 4px;
}

.mobile-homepage-menu::-webkit-scrollbar-track {
    background: #374151;
}

.mobile-homepage-menu::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 2px;
}

.mobile-homepage-menu::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile menu animation improvements */
@media (max-width: 768px) {
    .mobile-homepage-menu nav ul {
        animation: slideInDown 0.3s ease-out;
    }

    @keyframes slideInDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Better focus states for mobile */
    .mobile-homepage-menu a:focus,
    .mobile-user-actions a:focus,
    .mobile-user-actions button:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
        border-radius: 4px;
    }
}

/* Header text responsiveness */
@media (max-width: 480px) {
    .mobile-homepage-menu a {
        font-size: 0.95rem;
    }

    .mobile-homepage-menu ul ul a {
        font-size: 0.875rem;
    }

    /* Smaller logo on very small screens */
    header a[href="/"] {
        font-size: 1.125rem !important;
    }
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
    .mobile-homepage-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Better spacing for mobile menu items */
    .mobile-user-actions a,
    .mobile-user-actions button {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Safe area padding for notched devices */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .mobile-menu-container {
            padding-left: max(1rem, env(safe-area-inset-left));
            padding-right: max(1rem, env(safe-area-inset-right));
        }
    }
}
