/* Index Page - Dark Mode Support */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root[data-theme="light"] {
    --primary: #1E3A8A;
    --primary-light: #3B82F6;
    --secondary: #64748B;
    --success: #10B981;
    --bg: #F8FAFC;
    --white: #FFFFFF;
    --text: #0F172A;
    --text-light: #64748B;
    --border: #E2E8F0;
    --shadow: rgba(0, 0, 0, 0.1);
}

:root[data-theme="dark"] {
    --primary: #60A5FA;
    --primary-light: #3B82F6;
    --secondary: #94A3B8;
    --success: #34D399;
    --bg: #0F172A;
    --white: #1E293B;
    --text: #F1F5F9;
    --text-light: #CBD5E1;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo i {
    font-size: 1.75rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: 0.2s;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9375rem;
    cursor: pointer;
}

.theme-toggle {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1E40AF 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main */
.main {
    padding: 3rem 0;
}

.card {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px var(--shadow);
    margin-bottom: 2rem;
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.hint i {
    color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--secondary);
    width: auto;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: #475569;
}

/* Loader */
.loader {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loader.active {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Results */
.results {
    display: none;
}

.results.show {
    display: block;
}

.success-header {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.success-header h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auto-info {
    background: var(--bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.auto-info h3 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.auto-info p {
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.code-section {
    margin-bottom: 2rem;
}

.code-header {
    background: #2D3748;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-header span {
    font-weight: 600;
}

.btn-copy {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-copy:hover {
    background: var(--primary-light);
}

pre {
    background: #1A202C;
    color: #A0AEC0;
    padding: 1.5rem;
    border-radius: 0 0 12px 12px;
    overflow-x: auto;
    max-height: 500px;
    margin: 0;
}

.actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Footer */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h4 {
    margin-bottom: 1rem;
}

.footer p {
    color: var(--text-light);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
    }

    .nav {
        gap: 1rem;
        order: 3;
        width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .card {
        padding: 1.5rem;
    }

    .actions {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}