:root {
    --primary-color: #d4a574;
    --secondary-color: #8b6f47;
    --accent-color: #f5f1e8;
    --text-dark: #3a3a3a;
    --text-light: #6b6b6b;
    --bg-light: #f5f1e8;
    --bg-light-gradient: #e8ddd0;
    --card-bg: #ffffff;
    --border-color: #e0d5c7;
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-light-hover: rgba(0,0,0,0.15);
    --footer-bg: #1f2937;
    --footer-border: #374151;
    --success-color: #10b981;
    --error-color: #ef4444;
}

[data-theme="dark"] {
    --primary-color: #8b6f47;
    --secondary-color: #5d4a37;
    --accent-color: #2d2d2d;
    --text-dark: #e0e0e0;
    --text-light: #a0a0a0;
    --bg-light: #1a1a1a;
    --bg-light-gradient: #2d2d2d;
    --card-bg: #2d2d2d;
    --border-color: #404040;
    --shadow-light: rgba(0,0,0,0.3);
    --shadow-light-hover: rgba(0,0,0,0.4);
    --footer-bg: #1a1a1a;
    --footer-border: #404040;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-light-gradient) 100%);
    color: var(--text-dark);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

.header-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: background 0.3s ease;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Index Page Styles */
.search-container {
    background: var(--card-bg);
    border-radius: 25px;
    box-shadow: 0 8px 32px var(--shadow-light);
    padding: 1.5rem;
    margin: 1rem auto;
    max-width: 600px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-light-hover);
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s ease;
    background: var(--card-bg);
    color: var(--text-dark);
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, color 0.3s ease;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.search-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    color: white;
}

.video-container {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--shadow-light);
    padding: 1.5rem;
    margin: 1rem auto;
    max-width: 800px;
    display: none;
    transition: background 0.3s ease;
}

.video-player {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    background: #000;
}

.subtitle-container {
    background: var(--accent-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 1rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.video-counter {
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
    transition: background 0.3s ease, color 0.3s ease;
}

.control-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    color: white;
}

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

.example-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.example-link {
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.example-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading i {
    font-size: 3rem;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

/* About Page Styles */
.content-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--shadow-light);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
    transition: background 0.3s ease;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.tip-card {
    background: var(--accent-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
}

/* Contact Page Styles */
.contact-info {
    background: var(--accent-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
    background: var(--card-bg);
    color: var(--text-dark);
}

.form-input:focus {
    border-color: var(--primary-color);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: 600;
}

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

.submit-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.message {
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    display: none;
}

.message.success {
    background: var(--success-color);
    color: white;
    display: block;
}

.message.error {
    background: var(--error-color);
    color: white;
    display: block;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.2rem;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .search-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .video-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .video-player {
        height: 250px;
    }
    
    .controls {
        gap: 0.5rem;
    }
    
    .control-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .search-button {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .content-card {
        margin: 1rem;
        padding: 1.5rem;
    }
}