:root {
    --primary-color: #4e57d4;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-primary: 'Poppins', sans-serif;
    
    /* Light Theme Colors */
    --background: #ffffff;
    --background-secondary: #f8f9fa;
    --text-color: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Section-specific colors */
    --features-bg: #f8f9fa;
    --contact-bg: #f8f9fa;
    --footer-bg: #212529;
}

/* Dark Theme Colors */
.dark-theme {
    --background: #121212;
    --background-secondary: #1e1e1e;
    --text-color: #e0e0e0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --card-bg: #2d2d2d;
    --header-bg: #1a1a1a;
    --shadow-color: rgba(0, 0, 0, 0.3);
    
    /* Section-specific colors for dark theme */
    --features-bg: #1e1e1e;
    --contact-bg: #1e1e1e;
    --footer-bg: #0a0a0a;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background);
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

/* Theme Toggle */
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
}

#theme-toggle {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    background-color: transparent;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Utility Classes */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #3942b0;
    border-color: #3942b0;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Header Styles */
.header {
    box-shadow: 0 2px 10px var(--shadow-color);
    background-color: var(--header-bg);
    transition: background-color 0.3s ease;
}

.navbar {
    background-color: var(--header-bg);
    transition: background-color 0.3s ease;
}

.navbar-brand img {
    border-radius: 5px;
}

.navbar-brand span {
    color: var(--text-color);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--text-color) !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-toggler {
    border-color: var(--border-color);
}

.navbar-toggler-icon {
    filter: invert(var(--navbar-toggler-inversion));
}

.dark-theme .navbar-toggler-icon {
    --navbar-toggler-inversion: 0.8;
}

/* Hero Countdown Section - New combined section */
.hero-countdown-section {
    padding-top: 90px;
    background-color: var(--background);
    position: relative;
    overflow: hidden;
}

.hero-countdown-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--primary-color) 0%, transparent 70%);
    opacity: 0.05;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
    max-width: 600px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 10px 25px var(--shadow-color);
    transition: transform 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
}

.countdown-value {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.countdown-label {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subscribe-form-container {
    max-width: 500px;
    margin: 0 auto;
}

/* Templates Section */
.templates-section {
    background-color: var(--background);
}

.template-card {
    border: none;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.template-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.card-img-overlay {
    top: 10px;
    left: 10px;
    right: auto;
    bottom: auto;
}

.card-title, .card-text {
    color: var(--text-color);
}

/* Features Section - Improved for dark theme */
.features-section {
    background-color: var(--features-bg);
    position: relative;
    overflow: hidden;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color) 0%, transparent 100%);
    opacity: 0.03;
}

.feature-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid transparent;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-color);
    border-color: rgba(78, 87, 212, 0.2);
}

.feature-icon {
    background: linear-gradient(135deg, rgba(78, 87, 212, 0.1) 0%, transparent 100%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto;
}

/* About Section */
.about-section {
    background-color: var(--background);
}

.about-section img {
    box-shadow: 0 10px 30px var(--shadow-color);
}

/* Contact Section - Improved for dark theme */
.contact-section {
    background-color: var(--contact-bg);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(225deg, var(--primary-color) 0%, transparent 100%);
    opacity: 0.03;
}

.card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

input.form-control, textarea.form-control {
    background-color: var(--background);
    border-color: var(--border-color);
    color: var(--text-color);
}

input.form-control:focus, textarea.form-control:focus {
    background-color: var(--background);
    color: var(--text-color);
    box-shadow: 0 0 0 0.25rem rgba(78, 87, 212, 0.25);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: #3942b0;
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: white;
}

.footer a {
    color: #a9b4fc;
    text-decoration: none;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-section {
        text-align: center;
    }
    
    .about-section {
        text-align: center;
    }

    .countdown-container {
        flex-wrap: wrap;
    }
    
    .countdown-item {
        min-width: 100px;
    }
}

@media (max-width: 576px) {
    .countdown-container {
        gap: 10px;
    }

    .countdown-item {
        min-width: 70px;
        padding: 10px;
    }

    .countdown-value {
        font-size: 2rem;
    }

    .countdown-label {
        font-size: 0.8rem;
    }
}
