/* User Authentication Styles */

/* Header User Section */
.user-auth-section {
    display: flex;
    align-items: center;
    margin-left: 15px;
    position: relative;
}

/* Single User Icon Button (Mobile/Desktop) */
.auth-icon-btn {
    width: 40px;
    height: 40px;
    background: #2a2a2a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none; /* Hidden by default, shown on mobile */
}

.auth-icon-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.auth-icon-btn i {
    font-size: 24px;
    color: #fff;
}

/* Auth Buttons (Desktop Only) */
.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-buttons.desktop-only {
    display: flex; /* Show on desktop */
}

.auth-buttons .btn-login,
.auth-buttons .btn-register {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-buttons .btn-login {
    background: #2a2a2a;
    color: #fff;
}

.auth-buttons .btn-login:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.auth-buttons .btn-register {
    background: var(--accent);
    color: #fff;
}

.auth-buttons .btn-register:hover {
    background: #333;
    transform: translateY(-2px);
}

/* User Profile Dropdown (Logged In) */
.user-profile-dropdown {
    position: relative;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #2a2a2a;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.user-avatar:hover {
    background: #333;
}

.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    pointer-events: none;
}

.user-avatar .user-name {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-avatar i {
    font-size: 10px;
    color: #999;
    transition: transform 0.3s ease;
}

.user-avatar:hover i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent);
}

.dropdown-header .user-info {
    flex: 1;
    overflow: hidden;
}

.dropdown-header .user-info strong {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-header .user-info span {
    display: block;
    color: #999;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-links {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.dropdown-links li {
    margin: 0;
}

.dropdown-links li.divider {
    height: 1px;
    background: #2a2a2a;
    margin: 10px 0;
}

.dropdown-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #b8b8b8;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 13px;
}

.dropdown-links a:hover {
    background: #2a2a2a;
    color: #fff;
}

.dropdown-links a i {
    width: 18px;
    font-size: 14px;
    color: var(--accent);
}

/* Auth Modal */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.auth-modal.active {
    display: flex;
}

.auth-modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10;
}

.auth-modal-close:hover {
    color: #fff;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid #2a2a2a;
}

.auth-tab {
    flex: 1;
    padding: 18px;
    background: transparent;
    border: none;
    color: #999;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab:hover {
    color: #fff;
}

.auth-tab.active {
    color: #fff;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

/* Auth Forms */
.auth-forms {
    padding: 30px;
}

.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
}

.auth-form-container h3 {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #b8b8b8;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group label i {
    margin-right: 6px;
    color: var(--accent);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: #333;
}

.form-group input::placeholder {
    color: #666;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    display: block;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    display: block;
}

.form-footer {
    margin-top: 15px;
    text-align: center;
}

.form-footer .forgot-pass {
    color: #999;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.form-footer .forgot-pass:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .user-avatar .user-name {
        display: none;
    }
    
    .auth-buttons .btn-login span,
    .auth-buttons .btn-register span {
        display: none;
    }
    
    .auth-buttons .btn-login,
    .auth-buttons .btn-register {
        padding: 8px 12px;
    }
    
    .auth-modal-content {
        width: 95%;
        max-width: 95%;
    }
    
    .auth-forms {
        padding: 20px;
    }
    
    .dropdown-header {
        padding: 15px;
    }
    
    .user-dropdown-menu {
        min-width: 240px;
    }
}

@media (max-width: 576px) {
     .user-auth-section .user-avatar .fas {
        display: none;
    }
    .user-auth-section {
        margin-left: 10px;
    }
    
    .auth-buttons {
        gap: 6px;
    }
    
    .auth-buttons .btn-login,
    .auth-buttons .btn-register {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .user-avatar {
        padding: 4px 8px;
    }
    
    .user-avatar img {
        width: 28px;
        height: 28px;
    }
}

/* Bookmark Button Styles */
.bookmark-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2a2a2a;
    border: 2px solid #333;
    border-radius: 6px;
    color: #b8b8b8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.bookmark-btn i {
    font-size: 16px;
    color: var(--accent);
}

.bookmark-btn:hover {
    background: #333;
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.bookmark-btn.bookmarked {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.bookmark-btn.bookmarked i {
    color: #fff;
}

.bookmark-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Anime Notification */
.anime-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #1a1a1a;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.anime-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.anime-notification.success {
    border-left: 4px solid #22c55e;
}

.anime-notification.error {
    border-left: 4px solid #ef4444;
}

.anime-notification.info {
    border-left: 4px solid var(--accent);
}

@media (max-width: 576px) {
    .anime-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }
    
    .anime-notification.show {
        transform: translateY(0);
    }
}

/* Anime Single Page Bookmark Button */
.bookmark[data-id] {
    cursor: pointer;
    transition: all 0.3s ease;
}

.bookmark[data-id]:hover {
    color: var(--accent) !important;
}

.bookmark[data-id].active {
    color: var(--accent) !important;
}

.bookmark[data-id].active i {
    color: var(--accent) !important;
}

.bookmark[data-id] i {
    transition: all 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Hide desktop buttons, show icon only */
    .auth-buttons.desktop-only {
        display: none !important;
    }
    
    .auth-icon-btn {
        display: flex !important;
    }
    
    /* User avatar name hidden on mobile */
    .user-avatar .user-name {
        display: none;
    }
    
    .user-avatar {
        padding: 6px;
    }
    
    /* Dropdown menu adjustments */
    .user-dropdown-menu {
        right: 0;
        min-width: 250px;
    }
}

@media (max-width: 480px) {
    /* Modal full width on small screens */
    .auth-modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    /* Auth icon slightly smaller */
    .auth-icon-btn {
        width: 36px;
        height: 36px;
    }
    
    .auth-icon-btn i {
        font-size: 20px;
    }
}
