:root {
    --bg-primary: #131827;
    --bg-header: #181d2d;
    --text-main: #f8fafc; /* Lighter color for better readability */
    --text-inactive: #94a3b8; /* Softened gray */
    --border-color: #394151;
    --accent-red: #E50914;
    --accent-purple: #872bed;
    --accent-gradient: linear-gradient(135deg, #872bed 0%, #6316c1 100%);
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #a78bfa; /* Soft purple/indigo for links */
    text-decoration: none;
    transition: color 0.2s;
}

a:visited {
    color: #c084fc; /* Slightly different shade for visited */
}

a:hover {
    color: #c084fc; /* Lighter purple for better contrast on dark bg */
    text-decoration: underline;
}

header {
    background: linear-gradient(90deg, #181d2d 0%, rgba(135, 67, 237, 0.25) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.footer {
    background: linear-gradient(0deg, #181d2d 0%, rgba(135, 67, 237, 0.05) 100%);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    padding-top: 0;
    padding-bottom: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-quote-section {
    flex: 1;
}

.footer-quote {
    font-style: italic;
    color: var(--text-inactive);
    font-size: 1.1rem;
    max-width: 500px;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-inactive);
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--accent-purple);
    text-decoration: none;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-inactive);
    font-size: 0.8rem;
}

.footer-status-badge img {
    height: 20px;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-quote {
        margin: 0 auto;
    }
    
    .footer-nav {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

.btn-primary:hover {
    opacity: 0.9;
}

.card {
    background: linear-gradient(135deg, #181d2d 0%, rgba(135, 67, 237, 0.15) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero {
    padding: 3rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Wizard Styles */
.wizard-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.wizard-step-card {
    background: linear-gradient(135deg, #181d2d 0%, rgba(135, 67, 237, 0.1) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.wizard-step-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-4px);
    background: linear-gradient(135deg, #1e2333 0%, rgba(135, 67, 237, 0.2) 100%);
}

.wizard-step-card.completed {
    border-color: #10b981;
    background: linear-gradient(135deg, #131827 0%, rgba(16, 185, 129, 0.1) 100%);
}

.wizard-step-card.completed .step-number {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 800;
    transition: all 0.3s;
    background: var(--bg-primary);
    color: var(--text-inactive);
}

.check-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #10b981;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.wizard-step-card.completed .check-icon {
    opacity: 1;
    transform: scale(1);
}

.step-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.step-info p {
    font-size: 0.85rem;
    color: var(--text-inactive);
    line-height: 1.5;
}

/* Service Links */
.app-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #181d2d 0%, rgba(135, 67, 237, 0.15) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s, border-color 0.2s;
}

.app-link:hover {
    transform: translateY(-2px);
    border-color: #872bed;
}

.app-icon {
    width: 48px;
    height: 48px;
    background: #2a3040;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
}

.app-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.app-info p {
    font-size: 0.85rem;
    color: var(--text-inactive);
}

/* Status Banner */
.status-banner {
    background: #1e2333;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
}

.status-banner a {
    display: flex;
    align-items: center;
    padding: 0.5rem 2rem;
    color: var(--text-main);
    text-decoration: none;
    max-width: 1200px;
    margin: 0 auto;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.75rem;
    position: relative;
}

.status-dot.online {
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
}

.status-dot.maintenance {
    background-color: #f59e0b;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
}

.carousel-container.no-scrollbar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.carousel-container.no-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.nav-btn {
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: var(--accent-gradient);
    border-color: transparent;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.movie-card {
    flex: 0 0 160px;
    background: var(--bg-header);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.movie-card:hover {
    transform: scale(1.05);
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: #1a1f2e;
}

.movie-info {
    padding: 0.5rem;
}

.movie-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-year {
    font-size: 0.75rem;
    color: var(--text-inactive);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    background: linear-gradient(135deg, #181d2d 0%, rgba(135, 67, 237, 0.15) 100%);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #872bed;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-inactive);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

/* Global Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: #872bed;
    color: white;
}

.btn-primary:hover {
    background-color: #a042ff;
    opacity: 1; /* Override default opacity hover if set elsewhere */
}

.btn-secondary {
    background-color: #4a5568;
    color: white;
}

.btn-secondary:hover {
    background-color: #636b77;
}

/* Plex Login Button */
.btn-plex {
    background-color: #e5a00d;
    color: #000 !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    border: none;
}

.btn-plex:hover {
    background-color: #ffb300;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 160, 13, 0.2);
    text-decoration: none;
}

/* Admin Dashboard Styles */
.admin-dashboard {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--bg-header); /* Using bg-header for consistency */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.admin-dashboard h2, .admin-dashboard h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
}
.admin-dashboard p {
    color: var(--text-inactive);
    margin-bottom: 1rem;
}

.admin-dashboard textarea {
    background-color: var(--bg-header); /* Replaced input-bg with bg-header for consistency */
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.text-green-500 { color: #10B981; }
.text-red-500 { color: #EF4444; }

/* Responsive Media Queries */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header {
        padding: 1rem;
    }

    header .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .header-auth-lang {
        width: 100%;
        justify-content: center;
    }

    .status-banner a span:last-child {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .wizard-horizontal {
        grid-template-columns: 1fr;
    }

    .movie-card {
        flex: 0 0 140px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
}
