:root {
    --primary-color: #4a6bff;
    --secondary-color: #6c757d;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin: 3rem 0;
}

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn i {
    margin-right: 8px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

.primary-btn:hover {
    background-color: #3a5bd9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: #f0f2ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Header */
.tts-header {
    background: linear-gradient(135deg, #6e45e2 0%, #89d4cf 100%);
    color: white;
    padding: 5rem 0 8rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 15px;
}

.logo-circle {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.logo-icon {
    font-size: 1.8rem;
    color: white;
    animation: bounce 2s infinite;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main Heading */
.main-heading {
    font-size: 3.5rem;
    margin: 1.5rem 0 3rem;
    font-weight: 800;
    position: relative;
    display: inline-block;
    min-height: 4.5rem;
}

.typing-text {
    display: inline-block;
    position: relative;
    background: linear-gradient(90deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cursor {
    display: inline-block;
    width: 3px;
    background: white;
    margin-left: 4px;
    animation: blink 0.7s infinite;
    vertical-align: baseline;
    height: 3rem;
    position: relative;
    top: 0.5rem;
}

/* Pulse Circle */
.pulse-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s infinite;
    z-index: 0;
}

/* Sound Wave */
.sound-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    padding-bottom: 20px;
    z-index: 1;
}

.sound-wave .bar {
    width: 8px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    animation: soundWave 1.5s ease-in-out infinite alternate;
}

.sound-wave .bar:nth-child(1) { animation-delay: 0s; height: 20px; }
.sound-wave .bar:nth-child(2) { animation-delay: 0.2s; height: 40px; }
.sound-wave .bar:nth-child(3) { animation-delay: 0.4s; height: 60px; }
.sound-wave .bar:nth-child(4) { animation-delay: 0.6s; height: 30px; }
.sound-wave .bar:nth-child(5) { animation-delay: 0.8s; height: 50px; }

/* Developer Credit */
.developer-credit {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 2;
}

.dev-name {
    font-weight: 600;
    background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: colorChange 5s infinite alternate;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.float-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    animation: float 15s infinite linear;
}

.float-icon:nth-child(1) { top: 20%; left: 10%; animation-duration: 20s; }
.float-icon:nth-child(2) { top: 60%; left: 80%; animation-duration: 25s; animation-delay: -5s; }
.float-icon:nth-child(3) { top: 40%; left: 50%; animation-duration: 30s; }

/* MS Logo */
.ms-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 12px;
}

.ms-square {
    width: 50px;
    height: 50px;
    background: #ffb900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 700;
    color: #000;
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

.ms-text {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Animated Text */
.animated-text {
    font-size: 3rem;
    margin: 1rem 0 2rem;
    position: relative;
    display: inline-block;
}

.animated-text .welcome {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out;
}

.animated-text .highlight {
    color: #ffb900;
    position: relative;
    display: inline-block;
    animation: colorChange 4s infinite alternate;
}

/* Wave Animation */
.wave-animation {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23ffffff"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%23ffffff"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23ffffff"/></svg>');
    background-size: 50% 100%;
    animation: wave 15s linear infinite;
}

.wave1 {
    opacity: 0.7;
    animation-delay: 0s;
}

.wave2 {
    opacity: 0.5;
    animation-delay: -5s;
    animation-duration: 20s;
}

.wave3 {
    opacity: 0.3;
    animation-delay: -2s;
    animation-duration: 25s;
}

/* Animations */
@keyframes wave {
    0% { transform: translateX(0) translateZ(0) scaleY(1); }
    50% { transform: translateX(-25%) translateZ(0) scaleY(0.8); }
    100% { transform: translateX(-50%) translateZ(0) scaleY(1); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes colorChange {
    0% { color: #ffb900; }
    25% { color: #ff8c00; }
    50% { color: #e81123; }
    75% { color: #68217a; }
    100% { color: #0078d4; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Feedback Section */
.feedback {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

.feedback h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.feedback-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6e45e2;
    box-shadow: 0 0 0 2px rgba(110, 69, 226, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Adjust main content spacing */
main {
    padding-top: 2rem;
}

/* Converter Section */
#converter {
    margin-top: 2rem;
    position: relative;
    z-index: 10;
    margin-bottom: 4rem;
}

.converter-box {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.text-input {
    display: flex;
    flex-direction: column;
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.char-count {
    text-align: right;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 500;
    font-size: 0.9rem;
}

select, input[type="range"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.range-group {
    position: relative;
}

.range-group span {
    font-weight: 400;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: var(--light-bg);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 4rem 0 0;
    margin-top: 4rem;
}

.footer-about {
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
}

.footer-about h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.footer-about p {
    color: #bdc3c7;
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.footer-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
}

.footer-features span {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.footer-features i {
    color: #6e45e2;
    margin-right: 8px;
    font-size: 1.1rem;
}

.footer-features span:hover {
    background: rgba(110, 69, 226, 0.2);
    transform: translateY(-2px);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h3, .footer-section h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #95a5a6;
}

.footer-bottom .dev-name {
    font-weight: 600;
    background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: colorChange 5s infinite alternate;
    padding: 0 5px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .converter-box {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero {
        padding: 2rem 0 4rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated {
    animation: fadeIn 0.6s ease-out forwards;
}
