/*
Theme Name: FreeTTS
Theme URI: https://freetss.gr
Description: Δωρεάν Online Text-to-Speech Εργαλεία - Free TTS Tools
Version: 1.0.0
Author: FreeTTS.gr
Text Domain: freetss
*/

/* ===== CSS Variables ===== */
:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #06b6d4;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-lg: 20px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
}

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

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

img {
    max-width: 100%;
    height: auto;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    margin-bottom: 15px;
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Header ===== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: var(--dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

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

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-switch {
    display: flex;
    gap: 5px;
    background: var(--light);
    padding: 4px;
    border-radius: 8px;
}

.lang-switch a {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray);
}

.lang-switch a.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        padding: 20px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #ddd6fe 100%);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

@media (max-width: 768px) {
    .hero {
        padding: 50px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    color: var(--white);
}

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

.btn-secondary:hover {
    background: #0891b2;
    color: var(--white);
}

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

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

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

.btn-success:hover {
    background: #16a34a;
    color: var(--white);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Tool Cards ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid transparent;
}

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

.tool-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.tool-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

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

/* ===== Category Section ===== */
.category-section {
    margin-bottom: 50px;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light);
}

.category-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* ===== Tool Area ===== */
.tool-area {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

/* Text Input Area */
.text-input-area {
    margin-bottom: 25px;
}

.text-input-area label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.text-input-area textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid var(--light);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

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

.char-count {
    text-align: right;
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 8px;
}

/* Voice Selection */
.voice-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.voice-option {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voice-option label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.voice-option select,
.voice-option input[type="range"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
}

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

/* Range Slider */
.range-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.range-wrapper input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 8px;
    background: var(--light);
    border-radius: 4px;
    border: none;
    padding: 0;
}

.range-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    min-width: 45px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
}

/* Playback Controls */
.playback-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.5);
}

.play-btn.playing {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Audio Visualizer */
.audio-visualizer {
    height: 60px;
    background: var(--light);
    border-radius: var(--radius);
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 20px;
}

.visualizer-bar {
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
    transition: height 0.1s ease;
}

.visualizer-bar.active {
    animation: visualize 0.5s ease-in-out infinite alternate;
}

@keyframes visualize {
    from { height: 10px; }
    to { height: 40px; }
}

/* Download Section */
.download-section {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border-radius: var(--radius);
    padding: 25px;
    text-align: center;
    margin-top: 25px;
}

.download-section h4 {
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.download-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Progress Bar */
.progress-wrapper {
    margin: 20px 0;
}

.progress-bar {
    height: 8px;
    background: var(--light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 10px;
}

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

.feature-item {
    text-align: center;
    padding: 30px 20px;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.feature-item h4 {
    margin-bottom: 10px;
}

.feature-item p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ===== FAQ Section ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--light);
}

.faq-answer {
    padding: 0 25px 20px;
    color: var(--gray);
    line-height: 1.7;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--dark);
    color: var(--gray-light);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

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

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--gray-light);
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    font-size: 0.9rem;
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-gray { color: var(--gray); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

/* ===== File Upload Area ===== */
.drop-zone {
    border: 2px dashed var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary);
    background: #f5f3ff;
}

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

.drop-zone h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.drop-zone p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ===== File List ===== */
.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.file-item-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.file-item-info {
    flex: 1;
}

.file-item-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 3px;
}

.file-item-size {
    font-size: 0.85rem;
    color: var(--gray);
}

.file-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 5px;
    line-height: 1;
}

/* ===== Notification ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.notification-success { background: var(--success); }
.notification-error { background: var(--danger); }
.notification-info { background: var(--primary); }

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

/* ===== Ad Placeholder ===== */
.ad-placeholder {
    background: var(--light);
    border: 2px dashed var(--gray-light);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    color: var(--gray);
    margin: 30px 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .tool-area {
        padding: 25px 20px;
    }
    
    .voice-options {
        grid-template-columns: 1fr;
    }
    
    .playback-controls {
        gap: 10px;
    }
    
    .play-btn {
        width: 60px;
        height: 60px;
    }
    
    .download-options {
        flex-direction: column;
    }
    
    .download-options .btn {
        width: 100%;
    }
}
