:root {
    --bg-color: #0d0d0d;
    --primary-bg: #131313;
    --secondary-bg: #1a1a1a;
    --tertiary-bg: #2a2a2a;
    --text-color: #ffffff;
    --text-secondary-color: #b0b8c1;
    --accent-color: #02effe;
    --accent-hover: #04d0db;
    --border-color: #333333;
    --warning-color: #ffa500;
}

body { font-family: 'Arial', sans-serif; margin: 0; padding: 0; background-color: #000; color: #fff; padding-top: 70px; }
header { background-color: rgba(18, 18, 18, 0.8); backdrop-filter: blur(10px); padding: 0 30px; border-bottom: 1px solid #222; display: flex; justify-content: space-between; align-items: center; position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 70px; }
header .logo-nav { display: flex; align-items: center; }
header .logo { font-size: 1.8em; font-weight: bold; color: #fff; text-decoration: none; margin-right: 30px; cursor: pointer; }
header .logo img { height: 40px; vertical-align: middle; }
nav { display: flex; gap: 25px; }
nav a { text-decoration: none; color: #ccc; font-weight: 500; font-size: 0.95em; transition: color 0.3s ease; }
nav a:hover { color: #fff; }
nav a.active { color: #02effe; }
.header-right { display: flex; align-items: center; gap: 20px; }
.header-icon { color: #ccc; font-size: 1.2em; cursor: pointer; transition: color 0.3s ease; }
.header-icon:hover { color: #fff; }
.language-selector-container { position: relative; display: flex; align-items: center; }
.language-popup { display: none; position: absolute; top: 100%; right: 0; background-color: #2c2c2c; border: 1px solid #555; border-radius: 5px; padding: 10px; z-index: 1000; min-width: 180px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
.language-popup.show { display: block; }
.language-popup select { width: 100%; padding: 8px; border-radius: 4px; border: 1px solid #444; background-color: #333; color: #fff; font-size: 14px; }
.signup-btn { background-color: #02effe; color: #000; padding: 8px 18px; text-decoration: none; border-radius: 20px; font-weight: bold; font-size: 0.9em; transition: background-color 0.3s ease; }
.signup-btn:hover { background-color: #04d0db; }
.credits-btn { color: white; text-decoration: none !important; display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; padding: 6px 12px; border-radius: 20px; background-color: rgba(255, 255, 255, 0.1); transition: background-color 0.2s; }
.credits-btn:hover { background-color: rgba(255, 255, 255, 0.2); }
.hero-section { text-align: center; padding: 60px 20px 40px; }
.hero-section h1 { font-size: 2.5em; color: #fff; margin-bottom: 15px; }
.hero-section .subtitle { font-size: 1.1em; color: #aaa; max-width: 600px; margin: 0 auto; }
.main-container { padding: 40px 40px; max-width: 1400px; margin: auto; }
.main-container h2 { text-align: center; font-size: 2em; color: #fff; margin-bottom: 30px; }
.mode-switcher { background-color: var(--primary-bg); border-radius: 8px; padding: 8px; display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 20px; }
.mode-switcher button { background: transparent; border: none; color: var(--text-secondary-color); padding: 10px 20px; border-radius: 6px; cursor: pointer; font-size: 1em; font-weight: 500; transition: background-color 0.3s, color 0.3s; }
.mode-switcher button.active { background-color: var(--tertiary-bg); color: var(--text-color); }
.content-area { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.generation-panel { background-color: var(--primary-bg); padding: 25px; border-radius: 12px; border: 1px solid var(--border-color); }
.tab-switcher { display: flex; background-color: var(--secondary-bg); border-radius: 8px; padding: 5px; margin-bottom: 20px; }
.tab-switcher button { flex: 1; background: transparent; border: none; color: var(--text-secondary-color); padding: 12px; border-radius: 6px; cursor: pointer; font-size: 1em; font-weight: 500; }
.tab-switcher button.active { background-color: var(--tertiary-bg); color: var(--text-color); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-color); }
.form-group label .required { color: #ff4444; }
.form-group textarea { width: 100%; height: 100px; min-height: 100px; background-color: var(--secondary-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px; color: var(--text-color); font-size: 1em; resize: vertical; box-sizing: border-box; }
.form-group textarea:focus { outline: none; border-color: var(--accent-color); }
.prompt-footer { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 8px; }
.prompt-info { font-size: 0.9em; color: var(--text-secondary-color); margin: 0; }
.character-count { font-size: 0.85em; color: var(--text-secondary-color); font-weight: 500; white-space: nowrap; }
.character-count.warning { color: var(--warning-color); }
.character-count.danger { color: #ff4444; }
.sound-toggle-container { display: flex; align-items: center; justify-content: space-between; padding: 15px; background-color: var(--secondary-bg); border-radius: 8px; border: 1px solid var(--border-color); }
.sound-toggle-label { display: flex; flex-direction: column; }
.sound-toggle-label span:first-child { font-weight: 500; color: var(--text-color); }
.sound-toggle-label span:last-child { font-size: 0.85em; color: var(--text-secondary-color); margin-top: 4px; }
.toggle-switch { position: relative; width: 50px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #444; transition: 0.4s; border-radius: 26px; }
.toggle-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: 0.4s; border-radius: 50%; }
.toggle-switch input:checked + .toggle-slider { background-color: var(--accent-color); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(24px); }
.duration-selector, .aspect-ratio-selector { display: flex; gap: 10px; }
.duration-btn, .aspect-ratio-btn { flex: 1; padding: 12px 20px; background-color: var(--secondary-bg); border: 2px solid var(--border-color); border-radius: 8px; color: var(--text-color); font-size: 1em; font-weight: 500; cursor: pointer; transition: all 0.3s ease; }
.duration-btn:hover, .aspect-ratio-btn:hover { border-color: var(--accent-color); }
.duration-btn.active, .aspect-ratio-btn.active { background-color: var(--accent-color); border-color: var(--accent-color); color: #000; }
.image-uploader { border: 2px dashed var(--border-color); border-radius: 8px; padding: 30px; text-align: center; cursor: pointer; transition: border-color 0.3s; background-color: var(--secondary-bg); }
.image-uploader:hover { border-color: var(--accent-color); }
.upload-placeholder { color: var(--text-secondary-color); }
.upload-icon { font-size: 2em; margin-bottom: 10px; color: var(--accent-color); }
.image-preview-container { display: none; position: relative; }
.image-preview-container img { max-width: 100%; max-height: 200px; border-radius: 8px; }
.clear-btn { position: absolute; top: 5px; right: 5px; background: rgba(255, 0, 0, 0.8); color: white; border: none; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 18px; }
.action-bar { margin-top: 25px; display: flex; justify-content: space-between; align-items: center; }
.reset-btn { background: transparent; border: 1px solid var(--border-color); color: var(--text-color); padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 1em; font-weight: 500; }
.generate-section { text-align: right; }
.credits-info { font-size: 0.9em; color: var(--text-secondary-color); }
.generate-btn { background: linear-gradient(90deg, #02effe 0%, #0072FF 100%); border: none; color: var(--text-color); padding: 10px 25px; border-radius: 8px; cursor: pointer; font-size: 1em; font-weight: bold; margin-left: 10px; }
.generate-btn:hover { background: linear-gradient(90deg, #02a4b2 0%, #0057c2 100%); box-shadow: 0 0 6px 2px rgba(2, 239, 254, 0.5); }
.preview-panel { background-color: var(--primary-bg); border-radius: 12px; border: 1px solid var(--border-color); display: flex; justify-content: center; align-items: center; min-height: 400px; flex-direction: column; padding: 20px; }
.placeholder-icon { font-size: 4em; color: var(--tertiary-bg); }
.placeholder-text { color: var(--text-secondary-color); margin-top: 15px; font-size: 1.1em; }
.preview-panel video { width: 100%; height: auto; border-radius: 8px; }
.loader { border: 5px solid #f3f3f3; border-top: 5px solid var(--accent-color); border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.history-panel { padding: 40px; max-width: 1400px; margin: 0 auto; }
.history-panel h2 { text-align: center; margin-bottom: 30px; }
.video-history-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.history-item { background-color: var(--secondary-bg); border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; position: relative; }
.history-item:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3); }
.history-item video { width: 100%; height: 150px; object-fit: cover; }
.history-item-content { padding: 15px; }
.history-item-prompt { text-align: center; color: var(--text-secondary-color); font-size: 0.9em; margin: 0; height: 4.5em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.history-item .delete-btn { position: absolute; top: 8px; right: 8px; z-index: 10; background: rgba(0, 0, 0, 0.6); color: #fff; border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 14px; cursor: pointer; opacity: 0; transition: all 0.2s; }
.history-item:hover .delete-btn { opacity: 1; }
.history-item .delete-btn:hover { background: rgba(255, 0, 0, 0.8); }
.empty-history-message { text-align: center; color: var(--text-secondary-color); padding: 40px; }
.pricing-section { padding: 80px 40px; background: var(--secondary-bg); }
.pricing-container { max-width: 1400px; margin: 0 auto; }
.pricing-section h2 { text-align: center; font-size: 2rem; margin-bottom: 40px; color: var(--text-color); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.pricing-card { background: var(--tertiary-bg); border-radius: 12px; padding: 25px; text-align: center; }
.pricing-card h3 { color: var(--accent-color); margin-bottom: 15px; font-size: 1.1em; }
.pricing-card .price { font-size: 2.5em; font-weight: bold; color: var(--text-color); margin: 10px 0; }
.pricing-card .unit { color: var(--text-secondary-color); font-size: 0.9em; }
.custom-footer { background: #111; color: #ccc; padding: 60px 0 30px 0; font-size: 1em; border-top: 1px solid #222; margin-top: 80px; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 40px; padding: 0 30px; }
.footer-section.footer-brand { flex: 1 1 320px; min-width: 260px; margin-bottom: 30px; }
.footer-logo-title { display: flex; align-items: center; margin-bottom: 12px; }
.footer-title { font-size: 1.5em; font-weight: bold; color: #fff; }
.footer-desc { color: #aaa; margin-bottom: 18px; font-size: 1em; line-height: 1.6; max-width: 350px; }
.footer-copyright { color: #666; font-size: 0.95em; margin-top: 18px; }
.footer-section.footer-links { display: flex; flex: 2 1 500px; gap: 60px; justify-content: flex-end; min-width: 320px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; min-width: 140px; }
.footer-col-title { color: #02effe; font-weight: bold; margin-bottom: 10px; letter-spacing: 1px; font-size: 1em; }
.footer-link { color: #ccc; text-decoration: none; margin-bottom: 4px; transition: color 0.2s; font-size: 1em; }
.footer-link:hover { color: #fff; text-decoration: underline; }
.mobile-menu-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; z-index: 1001; }
.mobile-menu { display: flex; position: fixed; top: 70px; right: 0; bottom: 0; width: 90%; max-width: 350px; background: var(--bg-color); z-index: 1002; padding: 30px; overflow-y: auto; flex-direction: column; align-items: center; gap: 30px; transform: translateX(100%); transition: transform 0.3s ease-in-out; visibility: hidden; }
.mobile-menu.active { transform: translateX(0); visibility: visible; }
.mobile-menu-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 1001; }
.mobile-menu-overlay.active { display: block; }
.mobile-menu nav { display: flex; flex-direction: column; width: 100%; align-items: center; gap: 25px; padding-bottom: 25px; border-bottom: 1px solid var(--border-color); }
.mobile-menu nav a { font-size: 1.2em; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center; z-index: 2000; }
.modal-content { background: var(--primary-bg); border-radius: 12px; padding: 30px; max-width: 800px; width: 90%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 15px; right: 15px; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }
.modal-actions { display: flex; gap: 15px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 12px; border-radius: 8px; border: none; cursor: pointer; font-size: 1em; font-weight: bold; }
.download-btn { background-color: var(--accent-color); color: #000; }
.btn-primary { background: linear-gradient(90deg, #02effe 0%, #0072FF 100%); color: #fff; border: none; border-radius: 8px; padding: 10px 28px; font-size: 1em; font-weight: bold; cursor: pointer; }

@media (max-width: 1024px) { .content-area { grid-template-columns: 1fr; } .video-history-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { header { padding: 0 20px; height: 56px; } header nav, header .header-right { display: none; } .mobile-menu-toggle { display: block; } .action-bar { flex-direction: column; align-items: stretch; } .action-bar .generate-section { text-align: center; width: 100%; } .action-bar .generate-btn { width: 100%; margin-left: 0; margin-top: 15px; } .footer-container { flex-direction: column; gap: 30px; align-items: flex-start; } .footer-section.footer-links { flex-direction: column; gap: 30px; width: 100%; } }
@media (max-width: 768px) { .hero-section h1 { font-size: 2em; } .main-container { padding: 20px; } .video-history-grid { grid-template-columns: repeat(2, 1fr); } .history-item .delete-btn { opacity: 1; } .duration-selector, .aspect-ratio-selector { flex-wrap: wrap; } .duration-btn, .aspect-ratio-btn { flex: 1 1 calc(50% - 5px); } }
@media (max-width: 480px) { .video-history-grid { grid-template-columns: 1fr; } }
