:root {
    --primary: #e63946;
    --primary-hover: #d62828;
    --bg-color: #f8f9fa;
    --surface-color: #ffffff;
    --text-color: #1d3557;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    --header-bg: rgba(255, 255, 255, 0.9);
    --canvas-bg: #e9ecef;
}

[data-theme="dark"] {
    --primary: #ef233c;
    --primary-hover: #d90429;
    --bg-color: #0d1b2a;
    --surface-color: #1b263b;
    --text-color: #e0e1dd;
    --text-muted: #a0aab2;
    --border-color: #415a77;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    
    --header-bg: rgba(27, 38, 59, 0.9);
    --canvas-bg: #0d1b2a;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Header */
.site-header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-accent {
    color: var(--surface-color);
    background: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

.logo-sub {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: none;
    margin-left: 4px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 10px 0;
    min-width: 200px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    color: var(--text-color);
}

.dropdown-menu a:hover {
    background: var(--bg-color);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--border-color);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--surface-color) 100%);
}

.hero h1 {
    font-size: 3rem;
    font-family: 'Oswald', sans-serif;
    margin-bottom: 20px;
    background: -webkit-linear-gradient(45deg, var(--primary), #ff9f1c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-color);
    border-color: var(--primary);
}

/* Tools Grid */
.tools-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    font-family: 'Oswald', sans-serif;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.tool-card {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.tool-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.tool-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Content Sections */
.content-section {
    padding: 60px 0;
    background: var(--surface-color);
}

.content-section:nth-child(even) {
    background: var(--bg-color);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.content-wrapper h2 {
    margin-bottom: 20px;
    font-family: 'Oswald', sans-serif;
}

.content-wrapper p, .content-wrapper ul {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.content-wrapper ul {
    padding-left: 20px;
}

.content-wrapper li {
    margin-bottom: 10px;
}

/* Generator Interface */
.generator-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px 0;
}

.generator-controls {
    flex: 1;
    min-width: 300px;
    background: var(--surface-color);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.generator-preview {
    flex: 1.5;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}

input[type="color"].form-control {
    padding: 2px;
    height: 40px;
}

.preview-canvas-container {
    background: var(--canvas-bg);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    overflow: hidden;
}

/* Modern Templates */
.template-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16/9;
    background-color: #000;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.template-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-overlay {
    position: absolute;
    bottom: 5%;
    left: 5%;
    right: 5%;
    display: flex;
    flex-direction: column;
}

.template-live {
    background: #cc0000;
    color: white;
    font-family: 'Oswald', sans-serif;
    font-size: 2vw;
    padding: 0.2em 0.5em;
    align-self: flex-start;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.template-headline {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    font-family: 'Oswald', sans-serif;
    font-size: 3.5vw;
    font-weight: 700;
    padding: 0.3em 0.5em;
    text-transform: uppercase;
    line-height: 1.1;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.template-ticker {
    background: #003366;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1.5vw;
    padding: 0.4em 0.8em;
    display: flex;
    align-items: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.template-ticker-label {
    font-weight: bold;
    color: #ffcc00;
    margin-right: 10px;
    text-transform: uppercase;
}

/* Footer */
.site-footer {
    background: var(--surface-color);
    padding: 60px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-brand {
    flex: 2;
    min-width: 300px;
}

.footer-brand p {
    margin-top: 15px;
    color: var(--text-muted);
}

.footer-links {
    flex: 1;
    min-width: 150px;
}

.footer-links h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--surface-color);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .template-live { font-size: 3vw; }
    .template-headline { font-size: 5vw; }
    .template-ticker { font-size: 2.5vw; }
    
    .generator-layout {
        flex-direction: column-reverse;
    }
}

@media (max-width: 992px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}
