/* CSS Variables */
:root {
    /* Colors */
    --primary-color: #4776E6;
    --primary-light: #8E54E9;
    --secondary-color: #6A82FB;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f9f9ff;
    --border-color: #e6e6e6;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    
    /* Sizes */
    --header-height: 70px;
    --footer-height: 120px;
    --container-width: 1200px;
    
    /* Transitions */
    --transition-speed: 0.3s;
    
    /* Box shadows */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Border radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

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

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

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Button Styles */
button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    box-shadow: var(--shadow-sm);
}

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

.primary-btn i {
    margin-left: 8px;
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 24px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

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

.secondary-btn i {
    margin-left: 8px;
}

.text-btn {
    background: none;
    color: var(--text-light);
    padding: 8px 16px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: color var(--transition-speed) ease;
}

.text-btn:hover {
    color: var(--primary-color);
}

.text-btn i {
    margin-right: 8px;
}

.icon-btn {
    background: none;
    color: var(--text-light);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.control-btn {
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    box-shadow: var(--shadow-sm);
}

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

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(71, 118, 230, 0.6);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(71, 118, 230, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(71, 118, 230, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 2s infinite;
}

@keyframes dots {
    0%, 20% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.dot:nth-child(1) {
    animation: dots 1.4s infinite 0s;
}

.dot:nth-child(2) {
    animation: dots 1.4s infinite 0.2s;
}

.dot:nth-child(3) {
    animation: dots 1.4s infinite 0.4s;
}

/* Header */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    position: relative;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

nav ul li a:hover:after, nav ul li a.active:after {
    width: 100%;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

/* Section Visibility */
.active-section {
    display: block;
}

.hidden-section {
    display: none;
}

/* Landing Section */
#landing {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 0;
}

.landing-content {
    flex: 1;
    min-width: 300px;
    padding-right: 2rem;
}

.landing-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.landing-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    width: 80%;
    max-width: 500px;
}

/* Interpreter Section */
.interpreter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.video-container {
    flex: 1;
    min-width: 300px;
}

.video-feed {
    width: 100%;
    height: 400px;
    background-color: #000;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
}

#video-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lip-tracking-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.processing-indicator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 4px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
}

.video-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.output-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

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

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

.transcription-box {
    flex: 1;
    min-height: 300px;
    max-height: 300px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    overflow-y: auto;
    margin-bottom: 1rem;
    background-color: var(--bg-light);
    transition: border-color var(--transition-speed) ease;
}

.transcription-box:focus-within {
    border-color: var(--primary-color);
}

.placeholder {
    color: var(--text-light);
    font-style: italic;
}

.speech-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#volume-slider {
    width: 100px;
}

/* Expression Feedback */
.expression-feedback {
    background-color: var(--bg-light);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.expression-indicators {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.expression-item {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.expression-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.expression-icon i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.expression-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.confidence-bar {
    width: 100%;
    height: 10px;
    background-color: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.confidence-level {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 5px;
    transition: width var(--transition-speed) ease;
}

/* Tutorial Section */
#tutorial-section {
    padding: 2rem 0;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.tutorial-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.step-content {
    flex: 1;
}

.step-image {
    margin-top: 1rem;
    width: 100%;
    height: 200px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

/* Footer */
footer {
    background-color: var(--bg-light);
    padding: 2rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.footer-info p {
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    box-shadow: var(--shadow-sm);
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-icon i {
    font-size: 1.2rem;
}

.footer-credits {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius-md);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
    margin-bottom: 0;
}

.close-modal {
    background: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color var(--transition-speed) ease;
}

.close-modal:hover {
    color: var(--error-color);
}

.modal-body {
    padding: 1.5rem;
}

.settings-group {
    margin-bottom: 2rem;
}

.settings-group h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.setting-item {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.setting-item label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.setting-item select, .setting-item input[type="range"] {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
}

.checkbox-setting {
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.2rem;
    }
    
    nav ul li {
        margin-left: 1rem;
    }
    
    .landing-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .landing-content h2 {
        font-size: 2rem;
    }
    
    .interpreter-container {
        flex-direction: column;
    }
    
    .video-feed {
        height: 300px;
    }
    
    .tutorial-step {
        flex-direction: column;
    }
    
    .step-number {
        margin-bottom: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0 1rem;
    }
    
    .logo i {
        font-size: 1.5rem;
        margin-right: 0.5rem;
    }
    
    nav ul li {
        margin-left: 0.8rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
    }
}

/* Dark Theme (for future implementation) */
.dark-theme {
    --text-color: #f5f5f5;
    --text-light: #b3b3b3;
    --bg-color: #121212;
    --bg-light: #1e1e1e;
    --border-color: #333;
}

/* High Contrast Theme (for accessibility) */
.high-contrast-theme {
    --primary-color: #0000ff;
    --primary-light: #00008b;
    --secondary-color: #008000;
    --text-color: #000;
    --bg-color: #fff;
    --border-color: #000;
}

/* Fade Transition for Section Changes */
.fade-transition {
    animation: fadeIn 0.3s ease-in-out;
} 