:root {
    --sky-blue: #87CEEB;
    --deep-blue: #1E90FF;
    --bg-color: #F8F9FA;
    --text-color: #333;
    --card-bg: #FFF;
    --border-color: #DEE2E6;
    
    --dark-bg: #121212;
    --dark-text: #FFF;
    --dark-card: #1E1E1E;
    --dark-border: #333;
}

[data-theme="dark"] {
    --bg-color: var(--dark-bg);
    --text-color: var(--dark-text);
    --card-bg: var(--dark-card);
    --border-color: var(--dark-border);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}
.discord-btn {
    height: 60px;
    width: 250px;
    background-color: white; /* White interior */
    border: 2px solid #87CEEB; /* Sky blue border */
    border-radius: 30px; /* Fully rounded borders (half of height) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 25px;
    font-weight: bold;
    color: #333; /* Dark text color */
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Ensures border is included in dimensions */
}
.discord-btn:hover {
    background-color: #f8f8f8; /* Slightly darker white on hover */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Subtle shadow */
}
.discord-btn span {
    font-size: 16px;
    flex-grow: 1; /* Makes text take remaining space */
    text-align: center;
}
.discord-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-right: 10px; /* Space between icon and text */
}


.logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.social-link img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Image Error Handling */
img[src=""],
img:not([src]) {
    display: none;
}

.image-fallback {
    display: inline-block;
    padding: 8px;
    background: rgba(0,0,0,0.05);
    border: 1px dashed rgba(0,0,0,0.1);
    color: var(--text-color);
    font-size: 0.8rem;
}

.top-section {
    background: linear-gradient(135deg, var(--sky-blue), var(--deep-blue));
    padding: 1rem;
}

.theme-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.5rem;
}

.theme-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    background-color: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-btn.active {
    background-color: white;
    color: var(--deep-blue);
}

.hero {
    padding: 1.5rem;
    width: 1440px;
    height: 60px;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 1.8rem;
    margin: 0;
}

.hero-subtitle {
    font-size: 1rem;
    margin: 0.5rem 0 0;
    opacity: 0.9;
}

.rounded-box {
    border-radius: 15px;
    margin: 0.5rem;
    background-color: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, var(--sky-blue), var(--deep-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 2rem;
}

.search-bar input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 2px solid var(--sky-blue);
    border-radius: 20px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
}

.main-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

.section {
    margin-bottom: 2rem;
}

.section h2 {
    color: var(--deep-blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--sky-blue);
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.error-text {
    text-align: center;
    color: #FF6B6B;
    padding: 2rem;
    grid-column: 1 / -1;
}

.footer {
    background-color: var(--card-bg);
    padding: 1.5rem;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-link:hover img {
    transform: scale(1.1);
}

.copyright {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

.auth-section {
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--deep-blue);
    cursor: pointer;
    margin-left: 0.5rem;
}

[data-theme="dark"] .logout-btn {
    color: var(--sky-blue);
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-bar {
        width: 100%;
        padding: 0;
        order: 3;
        margin-top: 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
}
