/* --- Global Styles & Resets --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #667eea;
}

/* --- Hero Section --- */
.hero-section {
    padding: 3rem 0;
    text-align: center;
    color: white;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* --- Converter Tool Container --- */
.converter-container {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 900px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.converter-title {
    text-align: center;
    color: #333;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.instructions {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
    font-size: 1.1rem;
}

#example-text-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

#example-text-link:hover {
    text-decoration: underline;
}

/* --- Text Input Area --- */
.textarea-container {
    position: relative;
    margin-bottom: 2rem;
}

#text-input {
    width: 100%;
    min-height: 150px;
    padding: 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
    background: #fafafa;
}

#text-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

#char-count {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.9rem;
    color: #999;
}

/* --- Controls Grid (Voice, Sliders) --- */
.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#voice-select {
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

#voice-select:focus {
    outline: none;
    border-color: #667eea;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
    transition: background 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: transform 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* --- Output Buttons & Status --- */
.output-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.output-buttons button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 150px;
}

#play-button {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

#play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

#download-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

#download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.status-message {
    text-align: center;
    padding-top: 1rem;
    min-height: 2rem;
    font-weight: 500;
}

/* *
 * ===== STYLES FOR ALL CONTENT SECTIONS (Features, FAQ, and ALL Inner Pages) ===== 
 *
 */
.content-section, .static-page {
    background: white;
    margin: 2rem auto;
    max-width: 900px;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.content-section h1, .content-section h2, .static-page h1 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-align: center;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-section p, .content-section li, .static-page p, .static-page li {
    line-height: 1.8;
    color: #555;
}

.content-section ul, .content-section ol, .static-page ul, .static-page ol {
    margin-left: 20px;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    background: #f8f9fa;
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    transition: background 0.3s ease;
    user-select: none;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    background: white;
}
.faq-answer p {
    margin: 0;
    padding-bottom: 1.5rem;
}

.faq-answer.active {
    padding-top: 1.5rem;
    max-height: 200px;
}
/* ===== END CONTENT SECTION STYLES ===== */


/* --- Footer --- */
footer {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto; /* Pushes footer to bottom */
}

.footer-links a {
    color: #eee;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* --- Styles for Blog Listing on blog.html --- */
.blog-listing {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}
.blog-listing:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.blog-listing h2 {
    text-align: left;
    margin-bottom: 0.5rem;
}
.blog-listing h2 a {
    text-decoration: none;
    color: #333;
    background: none;
    -webkit-text-fill-color: inherit;
}
.blog-listing h2 a:hover {
    color: #667eea;
}
.blog-listing p {
    color: #666;
}
.blog-listing a {
    color: #667eea;
    font-weight: 500;
}

/* --- NEW STYLES for Pro Tips Section --- */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tip-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.tip-card h4 {
    color: #667eea;
    margin-bottom: 0.75rem;
}

.tip-card p {
    color: #555;
    margin-bottom: 1rem;
}

.tip-card .example-text {
    background-color: #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-style: italic;
    color: #333;
    margin-bottom: 0;
}
/* --- END OF NEW STYLES --- */


/* --- Responsive Design --- */
@media (max-width: 768px) {
    /* ... your existing responsive styles ... */
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }
    .main-nav ul {
        gap: 1rem;
    }
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .converter-container, .content-section, .static-page {
        margin: 1rem;
        padding: 1.5rem;
    }
    .controls-grid {
        grid-template-columns: 1fr;
    }
    .output-buttons {
        flex-direction: column;
        align-items: center;
    }
}