/* General Styles */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

/* General Header Styling */
header {
    background-color: #f5f5f5;
    padding: 20px;
    text-align: center;
    position: relative;
    border-bottom: 2px solid #e0e0e0; /* Straight line across the bottom */
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #000;
    margin: 0;
}

/* Navigation Menu */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 1rem;
}

.nav-links a:hover {
    color: #007bff;
}

/* Hamburger Menu for Mobile */
.menu-toggle {
    display: none; /* Hidden by default */
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #000;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex; /* Show the hamburger menu */
    }

    .nav-links {
        display: none; /* Hide menu links by default on mobile */
        flex-direction: column;
        gap: 10px;
        background-color: #f5f5f5;
        padding: 10px;
        position: absolute;
        top: 60px; /* Adjust based on header height */
        left: 0;
        right: 0;
        border-top: 1px solid #ddd;
    }

    .nav-links a {
        text-align: center;
        padding: 10px;
    }

    .nav-links.active {
        display: flex; /* Show the menu when active */
    }
}



footer {
    text-align: center;
    background-color: #f5f5f5;
    padding: 10px 0;
    border-top: 2px solid #e0e0e0;
    color: #777;
    font-size: 0.9rem;
}

/* Home Page */
.home-container {
    text-align: center;
    padding: 50px 20px;
}

.home-container h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
}

.home-container p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.home-container .buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Adjust buttons for smaller screens */
}

.button {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background-color: #007bff;
    border: 2px solid #007bff;
    border-radius: 5px;
    transition: 0.3s ease;
}

.button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #fff;
}

/* Upload Page */
.upload-container {
    text-align: center;
    padding: 50px 20px;
}

.upload-container h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 20px;
}

.upload-container p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.file-input {
    margin-bottom: 20px;
    font-size: 1rem;
    width: 100%; /* Full-width on smaller screens */
    max-width: 400px; /* Limit width on larger screens */
}

.flash {
    margin: 10px auto;
    padding: 10px;
    max-width: 400px;
    border-radius: 5px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    text-align: center;
}

.flash.danger {
    background-color: #dc3545;
}

.about-container {
    max-width: 1500px;
    margin: 0 auto; 
    padding: 20px; 
    line-height: 1.6; 
}

/* Responsive Design */

/* For tablets and smaller devices (max-width: 768px) */
@media (max-width: 768px) {
    header {
        flex-direction: column; /* Stack header elements */
        text-align: center;
    }

    header nav {
        flex-direction: column; /* Stack navigation links */
        gap: 10px;
    }

    .home-container h2 {
        font-size: 1.8rem;
    }

    .home-container p {
        font-size: 1rem;
    }

    .button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .upload-container h2 {
        font-size: 1.8rem;
    }

    .upload-container p {
        font-size: 1rem;
    }
}

/* For mobile devices (max-width: 480px) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }

    header nav a {
        font-size: 0.9rem;
    }

    .home-container h2 {
        font-size: 1.5rem;
    }

    .home-container p {
        font-size: 0.9rem;
    }

    .button {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .upload-container h2 {
        font-size: 1.5rem;
    }

    .upload-container p {
        font-size: 0.9rem;
    }
}
/* General button styling */
button {
    padding: 10px 15px;
    font-size: 16px;
    margin: 5px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Active recording button style */
button.recording {
    background-color: red;
    color: white;
    border: 2px solid darkred;
}
button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}


/* Recording indicator */
#recording-indicator {
    margin-top: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: red;
    display: none;
}

/* Controls container */
.controls {
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
}

table thead tr {
    background-color: #f2f2f2;
    color: #333;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 8px;
}

table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tbody tr:hover {
    background-color: #f1f1f1;
}
.btn-danger {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
}

.btn-danger:hover {
    background-color: #e60000;
}
.alert {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: bold;
}
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.audio-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}

.audio-label {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    transition: color 0.3s ease;
}

canvas {
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 10px;
    background: #f9f9f9;
}

.button.loading {
    pointer-events: none;
    opacity: 0.8;
    background: repeating-linear-gradient(
        -45deg,
        var(--primary-color),
        var(--primary-color) 10px,
        var(--primary-hover) 10px,
        var(--primary-hover) 20px
    );
    animation: loading 1s linear infinite;
}

@keyframes loading {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100% 0;
    }
}


/* Specific styles for the record page */
body.record {
    background-color: #ffffff;
    font-family: 'Roboto', sans-serif;
}

/* Recording page layout */
body.record .visualization-container {
    text-align: center;
    margin: 20px 0;
}

body.record canvas {
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #f9f9f9;
    width: 100%;
    max-width: 600px; /* Limit maximum width */
    margin: 0 auto;
}

body.record .controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

body.record .audio-container {
    text-align: center;
    margin-top: 30px;
}

body.record .audio-label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

body.record .upload-section {
    text-align: center;
    margin-top: 30px;
}

/* Buttons on the record page */
body.record .button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

body.record .button:hover {
    background-color: #0056b3;
}

body.record button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

body.record button.recording {
    background-color: red;
    color: white;
    border: 2px solid darkred;
}

body.record button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Visualizer-specific styles */
body.record canvas {
    width: 100%;
    height: 100px;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin-top: 10px;
}

body.record #recording-indicator {
    font-size: 1.2rem;
    font-weight: bold;
    color: red;
    margin-top: 20px;
    display: none;
}

/* Notebook-style container */
.notebook-container {
    width: 80%;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.section {
    margin-bottom: 20px;
    padding: 15px;
    border-left: 5px solid #007BFF;
    background: #f9f9f9;
    border-radius: 5px;
}

h2 {
    color: #333;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 5px;
}

.citation {
    font-style: italic;
    font-size: 14px;
    color: #555;
    background: #fff3cd;
    padding: 10px;
    border-left: 5px solid #ffcc00;
    border-radius: 5px;
}

/* Centered box with dynamic background */
.prediction-container {
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
    animation: fadeIn 1.5s ease-in-out;
    width: 50%;  /* Set a width for better appearance */
    max-width: 500px;  /* Prevents too large */
    margin: 50px auto; /* Centering the box */
    background-color: white; /* Default, will change dynamically */
}

/* Emotion text animation */
.emotion-text {
    font-size: 28px;
    font-weight: bold;
    opacity: 0;
    animation: fadeInText 2s ease-in-out forwards;
}

/* Animation for appearing */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInText {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Emotion GIFs */
.emotion-gif {
    width: 150px;
    height: 150px;
    margin: 20px auto;
}

/* Try Again Button */
.try-again {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 18px;
    color: white;
    background-color: #007BFF;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.try-again:hover {
    background-color: #0056b3;
}

.diagram-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}
/* Inserting Diagrams */
.diagram-box {
    flex: 1 1 48%;
    text-align: center;
}

.diagram-box img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.smaller-img {
    width: 65%; 
    margin: 0 auto;
}
/* Keep picture and text together */

.image-text-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.image-text-row .image-box {
    flex: 1 1 100%;
    max-width: 500px;
}

.image-text-row .image-box img {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.image-text-row .text-box {
    flex: 1;
}


