/* Root Variables */
:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    
    /* Neon Colors */
    --neon-blue: #00d4ff;
    --neon-green: #00ff88;
    --neon-purple: #8b5cf6;
    --neon-pink: #ff0080;
    
    /* UI Colors */
    --border-color: #333333;
    --error-color: #ff4444;
    --success-color: #00ff88;
    --warning-color: #ffaa00;
    
    /* Dark mode only - light theme colors removed */
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    --gradient-secondary: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    --gradient-tertiary: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    
    /* Shadows and Effects */
    --shadow-sm: 0 2px 4px rgba(0, 212, 255, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 212, 255, 0.2);
    --shadow-lg: 0 8px 24px rgba(0, 212, 255, 0.3);
    --glow-sm: 0 0 10px rgba(0, 212, 255, 0.3);
    --glow-md: 0 0 20px rgba(0, 212, 255, 0.4);
    --glow-lg: 0 0 30px rgba(0, 212, 255, 0.5);
}

/* Dark mode only - light theme override removed */

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

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
}

/* Optimized Matrix Background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: -1;
    background-image: 
        linear-gradient(90deg, var(--neon-blue) 1px, transparent 1px),
        linear-gradient(180deg, var(--neon-blue) 1px, transparent 1px);
    background-size: 80px 80px;
    animation: matrixMove 60s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

/* Light theme matrix background removed */

@keyframes matrixMove {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(80px, 80px, 0); }
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Light theme navbar removed */

.nav-brand .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-brand .logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.nav-brand .logo:hover {
    filter: drop-shadow(var(--glow-sm));
}

.nav-brand .logo svg {
    transition: all 0.3s ease;
}

.nav-brand .logo:hover svg {
    transform: rotate(5deg) scale(1.05);
}

.nav-brand .logo svg {
    transition: all 0.3s ease;
}

.nav-brand .logo:hover svg {
    transform: rotate(5deg) scale(1.05);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--neon-blue);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: var(--glow-sm);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme toggle removed - dark mode only */

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    text-align: center;
    justify-content: center;
    min-width: 120px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--glow-md);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--neon-blue);
    box-shadow: var(--glow-sm);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--neon-blue);
}

.btn-icon.delete:hover {
    color: var(--error-color);
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: var(--glow-sm);
}

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

/* Get Started Page */
.get-started-main {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.hero-section {
    max-width: 800px;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

.hero-tagline {
    font-size: 1.4rem;
    color: var(--neon-green);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description-box {
    position: relative;
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all 0.3s ease;
}

.hero-description-box::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, 
        var(--neon-blue) 0%, 
        var(--neon-purple) 25%, 
        var(--neon-green) 50%, 
        var(--neon-blue) 75%, 
        var(--neon-purple) 100%);
    background-size: 400% 400%;
    border-radius: 18px;
    z-index: -1;
    animation: borderGlow 4s ease-in-out infinite;
    opacity: 0.8;
}

.hero-description-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(0, 255, 136, 0.04) 0%, transparent 50%);
    border-radius: 14px;
    z-index: -1;
}

.hero-description-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 48px rgba(0, 212, 255, 0.25);
}

.hero-description-box:hover::before {
    animation-duration: 2s;
    opacity: 1;
}

.hero-description {
    font-size: 1.1rem;
    color: #000000;
    font-weight: bold;
    line-height: 1.8;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: none;
}

@keyframes borderGlow {
    0%, 100% { 
        background-position: 0% 50%;
    }
    50% { 
        background-position: 100% 50%;
    }
}

.hero-details h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero-details p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.cta-buttons {
    margin-top: 2rem;
}

.features-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    width: 100%;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--neon-blue), transparent);
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 0.1;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-md);
    border-color: var(--neon-blue);
}

.feature-card.clickable {
    cursor: pointer;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-arrow {
    margin-top: 1rem;
    font-size: 1.5rem;
    color: var(--neon-blue);
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-arrow {
    transform: translateX(5px);
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3)); }
    to { filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.6)); }
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

/* Authentication Pages */
.auth-main {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    max-width: 400px;
    width: 100%;
}

.auth-form-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

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

.auth-switch {
    text-align: center;
}

.link-btn {
    background: none;
    border: none;
    color: var(--neon-blue);
    cursor: pointer;
    text-decoration: underline;
    font-size: 1rem;
}

.link-btn:hover {
    color: var(--neon-green);
}

/* Home Page */
.home-main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.welcome-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.recent-activity {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.recent-activity h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.activity-item.empty-state {
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.activity-type {
    font-size: 1.5rem;
    min-width: 40px;
}

.activity-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-content p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.activity-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Feature Pages */
.tts-main, .stt-main {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.feature-header {
    text-align: center;
    margin-bottom: 3rem;
}

.feature-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Text-to-Speech Page */
.tts-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.character-count {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.voice-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.voice-controls .form-group {
    margin-bottom: 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.status-section {
    display: flex;
    justify-content: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.status-indicator.speaking {
    border-color: var(--neon-green);
    box-shadow: var(--glow-sm);
}

.status-indicator.completed {
    border-color: var(--success-color);
}

.status-indicator.error {
    border-color: var(--error-color);
}

.status-text {
    color: var(--text-primary);
    font-weight: 500;
}

/* Speech-to-Text Page */
.stt-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.microphone-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.mic-visual {
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 50%;
    background: var(--bg-tertiary);
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.mic-visual.listening {
    border-color: var(--neon-green);
    box-shadow: var(--glow-md);
    animation: pulse 1.5s ease-in-out infinite;
}

.mic-visual.processing {
    border-color: var(--neon-blue);
    box-shadow: var(--glow-sm);
}

.mic-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.mic-status {
    color: var(--text-secondary);
    font-weight: 500;
}

.mic-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.mic-btn {
    min-width: 150px;
}

.language-controls {
    max-width: 300px;
    margin: 0 auto;
}

.transcription-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.transcription-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

/* Profile Page */
.profile-main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    margin-bottom: 3rem;
}

.profile-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.user-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    margin: 0 auto 1rem;
}

.user-details h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.user-details p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.member-since {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--neon-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.conversions-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: var(--text-primary);
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-controls select {
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

.conversions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.conversion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.conversion-item:hover {
    border-color: var(--neon-blue);
    box-shadow: var(--glow-sm);
}

.conversion-type {
    font-size: 1.5rem;
    min-width: 40px;
}

.conversion-content {
    flex: 1;
}

.conversion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.conversion-header h4 {
    color: var(--text-primary);
}

.conversion-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.conversion-preview {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.conversion-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.conversion-actions {
    display: flex;
    gap: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-content.large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.conversion-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.detail-row.full-width {
    flex-direction: column;
    gap: 0.5rem;
}

.detail-row label {
    min-width: 100px;
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-row span {
    color: var(--text-primary);
}

.text-content {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--text-primary);
    max-height: 200px;
    overflow-y: auto;
}

/* Messages */
.error-message, .success-message {
    display: none;
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    z-index: 3000;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.error-message {
    background: rgba(255, 68, 68, 0.9);
    color: white;
    border: 1px solid var(--error-color);
}

.success-message {
    background: rgba(0, 255, 136, 0.9);
    color: white;
    border: 1px solid var(--success-color);
}

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

/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575px) {
    .container {
        padding: 0 0.75rem;
        max-width: 100%;
    }
    
    .navbar {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
    }
    
    .nav-brand .logo {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 1rem 0.75rem;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        order: 3;
        width: 100%;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
        text-align: center;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .hero-content {
        padding: 1.5rem 0.75rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-tagline {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-description-box {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .features-preview {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.75rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .form-container {
        padding: 1.5rem;
        margin: 1rem 0.75rem;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .voice-controls {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .mic-visual {
        width: 120px;
        height: 120px;
    }
    
    .mic-icon {
        font-size: 2.5rem;
    }
    
    .mic-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .mic-btn {
        min-width: auto;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem 0.5rem;
        padding: 1rem;
    }
    
    .conversion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .empty-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    .container {
        padding: 0 1rem;
        max-width: 540px;
    }
    
    .navbar {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .hero-description-box {
        padding: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        width: auto;
    }
    
    .features-preview {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-container {
        padding: 2rem;
        margin: 1.5rem 1rem;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
    }
    
    .voice-controls {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mic-visual {
        width: 160px;
        height: 160px;
    }
    
    .mic-controls {
        flex-direction: row;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 0 1.5rem;
    }
    
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .hero-content {
        padding: 3rem 1.5rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-tagline {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1.05rem;
    }
    
    .features-preview {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .cta-buttons {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .profile-container {
        grid-template-columns: 1fr 2fr;
    }
    
    .voice-controls {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mic-visual {
        width: 180px;
        height: 180px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
    
    .features-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .mic-visual {
        width: 200px;
        height: 200px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-content {
        padding: 4rem 2rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-tagline {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1.15rem;
    }
    
    .features-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-content {
        padding: 1rem 0.75rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-tagline {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .hero-description-box {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .hero-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .cta-buttons {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .mic-visual {
        width: 100px;
        height: 100px;
    }
    
    .mic-icon {
        font-size: 2rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .hero-description-box::before {
        background-size: 200% 200%;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
    
    .light-theme {
        --border-color: #000000;
        --text-secondary: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .matrix-bg {
        animation: none;
    }
}

/* Print styles */
@media print {
    .matrix-bg,
    .navbar,
    .btn,
    .modal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .conversion-item {
        border: 1px solid #ccc !important;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
}
