:root {
    --primary: #ff4081;
    --primary-dark: #ba2f5f;
    --secondary: #ff4081;
    --dark: #121212;
    --dark-light: #1e1e1e;
    --light: #f5f5f5;
    --gray: #888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
}

/* Header & Navigation */
header {
    background-color: rgba(18, 18, 18, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.search-container {
    display: flex;
    align-items: center;
}

.search-container form {
    display: flex;
    align-items: center;
    background: var(--dark-light);
    border-radius: 30px;
    padding: 0.5rem 1rem;
    width: 300px;
}

.search-container input {
    background: transparent;
    border: none;
    color: var(--light);
    width: 100%;
    outline: none;
    padding: 0.5rem;
}

.search-container button {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background 0.3s;
}

.search-container button:hover {
    background: var(--primary-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.cta-button {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 64, 129, 0.3);
}

/* Content Sections */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.anime-card {
    background: var(--dark-light);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.anime-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.anime-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.anime-info {
    padding: 1rem;
}

.anime-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anime-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--gray);
}

/* Footer */
footer {
    background: var(--dark-light);
    padding: 3rem 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(138, 43, 226, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: var(--dark-light);
    margin: 2rem auto;
    width: 90%;
    max-width: 1000px;
    border-radius: 10px;
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem;
    background: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .search-container form {
        width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* User Menu Styling */
.user-menu {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.auth-links .login-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-links .login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 64, 129, 0.4);
}

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-avatar, .user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
}

.user-name {
    font-weight: 500;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.user-btn:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 0;
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-divider {
    margin: 8px 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    color: #ff6b6b !important;
}

.logout-btn:hover {
    background: rgba(255, 107, 107, 0.1) !important;
}

/* Auth/Login Page Styling */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

/* Admin Panel Base Styles */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.admin-header {
    text-align: center;
    margin-bottom: 40px;
}

.admin-header h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 5px;
}

.admin-tabs .tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-tabs .tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 64, 129, 0.4);
}

.admin-tabs .tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-tab {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-tab.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.tab-header h2 {
    color: #fff;
    font-size: 2rem;
    margin: 0;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 64, 129, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: rgba(86, 171, 47, 0.2);
    border: 1px solid rgba(86, 171, 47, 0.3);
    color: #56ab2f;
}

.alert-error {
    background: rgba(255, 65, 108, 0.2);
    border: 1px solid rgba(255, 65, 108, 0.3);
    color: #ff416c;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 64, 129, 0.1);
}

/* Responsive Updates */
@media (max-width: 768px) {
    .user-name {
        display: none;
    }
    
    .user-menu {
        margin-left: 10px;
    }
    
    .admin-container {
        padding: 20px 10px;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .admin-tabs .tab-btn {
        min-width: auto;
    }
}

/* Invite Button Styles */
.btn-copy, .btn-copy-link, .btn-share {
    padding: 6px 12px;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-copy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-copy-link {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.btn-share {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

.btn-copy:hover, .btn-copy-link:hover, .btn-share:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Continue Watching Section */
.continue-watching-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title svg {
    color: var(--primary);
}

.see-all-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.see-all-link:hover {
    transform: translateX(5px);
    color: var(--primary-dark);
}

.continue-watching-card {
    position: relative;
}

.continue-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.95) 0%, rgba(186, 47, 95, 0.95) 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.continue-badge svg {
    width: 12px;
    height: 12px;
}

.trending-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, rgba(255, 64, 129, 0.95) 0%, rgba(255, 75, 43, 0.95) 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 900;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
}

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffd700;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Enhanced anime card hover effects */
.anime-card:hover .continue-badge,
.anime-card:hover .trending-badge,
.anime-card:hover .rating-badge {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}
