/* AI Translation Tool - Modern Responsive Stylesheet */

:root {
    --primary-color: #4A90E2;
    --secondary-color: #357ABD;
    --accent-color: #50C878;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    text-align: center;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-dark);
    max-width: 800px;
    margin: 0 auto;
}

/* Translation Tool Section */
.translation-tool {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.language-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.language-dropdown {
    flex: 1;
    min-width: 200px;
}

.language-dropdown select {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.language-dropdown select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.swap-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.swap-button:hover {
    background: var(--secondary-color);
    transform: rotate(180deg);
}

/* Text Areas */
.text-areas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.text-box {
    position: relative;
}

.text-box textarea {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
}

.text-box textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.char-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.9rem;
    color: #999;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--accent-color);
    color: white;
}

.btn-secondary:hover {
    background: #45b369;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Features Section */
.features-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

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

.feature-card {
    text-align: center;
    padding: 30px;
    background: var(--light-bg);
    border-radius: 15px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Content Pages */
.content-page {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.content-page h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.content-page h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.content-page h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-top: 20px;
    margin-bottom: 10px;
}

.content-page p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.content-page ul, .content-page ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.content-page li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Footer */
footer {
    background: rgba(26, 26, 46, 0.95);
    color: var(--text-light);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    margin-bottom: 10px;
}

.footer-section a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        display: none;
        box-shadow: var(--shadow);
    }

    nav ul.active {
        display: flex;
    }

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

    .language-selector {
        flex-direction: column;
    }

    .swap-button {
        transform: rotate(90deg);
    }

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

    .hero-section p {
        font-size: 1rem;
    }

    .site-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .translation-tool,
    .hero-section,
    .features-section,
    .content-page {
        padding: 20px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-color);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    display: none;
    animation: slideIn 0.3s ease;
    z-index: 2000;
}

.toast.show {
    display: block;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}