:root {
    color-scheme: light dark;
}

html {
    visibility: visible;
    opacity: 1;
}

html.theme-pending {
    visibility: hidden;
    opacity: 0;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #50e3c2;
    --background-color: #f8f9fa;
    --text-color: #333;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --card-background: white;
    --phoneme-bg: #e74c3c;
    --phoneme-hover-bg: #c0392b;
    --ad-background: #f0f0f0;
    --highlight-color: #fff59d;
}

[data-theme="dark"] {
    --primary-color: #64b5f6;
    --secondary-color: #4db6ac;
    --background-color: #121212;
    --text-color: #e0e0e0;
    --box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
    --card-background: #1e1e1e;
    --phoneme-bg: #c0392b;
    --phoneme-hover-bg: #e74c3c;
    --ad-background: #2a2a2a;
    --highlight-color: #ffe60081;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.outer-container {
    display: flex;
    justify-content: center;
}

.underline-hover:hover {
    text-decoration: underline;
    cursor: pointer;
}

.ad-space-portrait {
    width: 120px;
    height: 600px;
    background-color: var(--ad-background);
    margin: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 10px;
    flex-grow: 1;
}

header {
    background-color: var(--card-background);
    box-shadow: var(--box-shadow);
    padding: 10px 0; /* Reduced padding */
    position: static; /* Changed from sticky to static */
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.header-content h1 {
    font-size: 1.2em; /* Reduce font size for mobile */
    margin: 0;
    white-space: nowrap; /* Prevent wrapping of the title */
}

.header-content h1 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-content h1 a:hover {
    color: var(--secondary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px; /* Reduce gap for mobile */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.searches-left {
    font-size: 0.8em; /* Reduced font size */
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 3px 8px; /* Reduced padding */
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#search-container {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 0;
    box-shadow: var(--box-shadow);
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--card-background);
}

#search-input {
    flex-grow: 1;
    padding: 8px 15px;
    font-size: 14px;
    border: none;
    outline: none;
    background-color: var(--card-background);
    color: var(--text-color);
    min-width: 120px;
}

#accent-filter {
    padding: 8px;
    font-size: 14px;
    border: none;
    background-color: var(--card-background);
    color: var(--text-color);
    cursor: pointer;
    outline: none;
}

#search-button {
    padding: 8px 15px;
    font-size: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-button:hover {
    background-color: #3a7bc8;
}

#main-content {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#video-wrapper {
    flex: 2;
    position: relative;
}

#video-and-subtitle-container {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: var(--card-background);
}

#video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

#player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#subtitle-container {
    padding: 10px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    background-color: var(--card-background);
    color: var(--text-color);
}

.arrow-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.arrow-button i,
#slow-button i,
#loop-button i {
    font-size: 24px;
}

.arrow-button:hover {
    background-color: #3a7bc8;
}

#prev-button {
    left: 10px;
}

#next-button {
    right: 10px;
}

#slow-button {
    left: calc(50% - 50px); /* Changed from -80px to -50px */
    background-color: rgba(74, 144, 226, 0.9); /* Increased opacity */
    backdrop-filter: blur(5px);
    color: white;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 10;
}

#slow-button.active {
    background-color: #4a90e2;
}

#slow-button:hover {
    background-color: #3a7bc8;
    opacity: 1;
}

#slow-button svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

#slow-button.inactive svg {
    stroke: #ffffff;
    /* White color for the icon */
}

#slow-button.active svg {
    stroke: white;
}

#slow-button:hover svg {
    stroke: white;
}

#loop-button {
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(39, 174, 96, 0.9); /* Increased opacity */
    backdrop-filter: blur(5px);
    color: white;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 20px;
    z-index: 10;
}

#loop-button.active {
    background-color: #27ae60;
}

#loop-button:hover {
    background-color: #3a7bc8;
    opacity: 1;
}

#slow-button:not(.active),
#loop-button:not(.active) {
    background-color: rgba(0, 0, 0, 0.5); /* Increased opacity */
    backdrop-filter: blur(5px);
}

#slow-button:not(.active) svg,
#loop-button:not(.active) i {
    opacity: 0.9; /* Increased opacity */
}

#linguistic-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#linguistic-info.hidden {
    display: none;
}

.info-box {
    background-color: var(--card-background);
    border-radius: 10px;
    padding: 10px;
    box-shadow: var(--box-shadow);
}

.info-box h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2em;
}

#nearby-words,
#hard-words {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.nearby-word,
.hard-word {
    background-color: var(--background-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nearby-word:hover,
.hard-word:hover {
    background-color: var(--primary-color);
    color: white;
}

.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 20px; /* Reduced height */
    position: relative;
    width: 40px; /* Reduced width */
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    background-color: #fff;
    bottom: 2px; /* Adjusted position */
    content: "";
    height: 16px; /* Adjusted size */
    left: 2px; /* Adjusted position */
    position: absolute;
    transition: .4s;
    width: 16px; /* Adjusted size */
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(20px); /* Adjusted translation */
}

.theme-icon {
    font-size: 1em; /* Reduced font size */
    color: var(--text-color);
    margin: 0 5px;
}

#ad-space {
    margin-top: 20px;
    background-color: var(--ad-background);
    padding: 10px;
    text-align: center;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.ipa-card {
    background-color: var(--card-background);
    border-radius: 15px;
    padding: 20px;
    color: var(--text-color);
    box-shadow: var(--box-shadow);
    position: relative;
}

.ipa-header {
    font-size: 0.9em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.word-pronunciation {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.word {
    font-size: 1.8em;
    font-weight: bold;
    word-break: break-all;
    max-width: 100%;
}

.pronunciation {
    font-style: italic;
    font-size: 1.2em;
    color: var(--text-color);
}

.phonemes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.phoneme {
    background-color: var(--phoneme-bg);
    color: white;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 16px;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    user-select: none;
}

.phoneme:hover {
    background-color: var(--phoneme-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.phoneme:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.phoneme.active {
    background-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.speaker-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.speaker-icon i {
    font-size: 18px;
}

.speaker-icon:hover {
    transform: scale(1.1);
    background-color: #3a7bc8;
}


@media (max-width: 1200px) {
    .ad-space-portrait {
        display: none;
    }
}

@media (max-width: 768px) {
    #main-content {
        flex-direction: column;
    }

    #search-container {
        flex-direction: column;
        border-radius: 10px;
    }

    #search-button {
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    .arrow-button {
        width: 40px;
        height: 40px;
        font-size: 25px;
    }

    .ipa-card {
        padding: 15px;
    }

    .word {
        font-size: 1.5em;
    }

    .pronunciation {
        font-size: 1em;
    }

    .phoneme {
        font-size: 14px;
        padding: 4px 8px;
    }

    .word-pronunciation {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .header-content {
        flex-direction: row; /* Changed from column to row */
        justify-content: space-between; /* Added to spread out content */
    }

    .header-right {
        flex-direction: row; /* Changed from column to row */
    }
}

#random-words-container {
    margin-top: 20px;
}

#random-words {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.random-word {
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.random-word:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Add this to your existing CSS */
@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

#error-message.loading {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Add this to your existing CSS */
#loop-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 20px;
    left: calc(50% + 50px);
    /* Adjust this value to position it next to the slow button */
    transform: translateX(-50%);
    z-index: 10;
}

#loop-button.inactive {
    background-color: #808080;
    /* Gray color for inactive state */
    opacity: 0.5;
    /* Reduced opacity for inactive state */
}

#loop-button.active {
    background-color: var(--secondary-color);
    opacity: 1;
}

#loop-button:hover {
    background-color: #3a7bc8;
    opacity: 1;
}


.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 100%);
    animation: shimmerAnimation 1.5s infinite;
}

[data-theme="light"] .shimmer::before {
    background: linear-gradient(to right,
            transparent 0%,
            rgba(0, 0, 0, 0.1) 50%,
            transparent 100%);
}

[data-theme="dark"] .shimmer::before {
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
}

@keyframes shimmerAnimation {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

#video-wrapper.loading #video-and-subtitle-container,
#video-wrapper.loading #linguistic-info {
    opacity: 0.7;
    pointer-events: none;
}



/* Add these styles to your existing CSS file */

#no-results-container {
    display: flex;
    text-align: center;
    align-items: center;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    }
.sound-icon {
    width: 70px;
    height: 70px;
}
#tts-button .ri-volume-up-line {
    font-size: 24px; 
  }

.snail-icon {
    width: 55px;
    height: 55px;
}

.no-results-text {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-color);
    max-width: 90%;
    word-break: break-word;
}
.tts-word {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    max-width: 90%;
    word-break: break-word;
}
.tts-pronunciation {
    font-size: 22px;
    color: #0066cc;
    font-style: italic;
}

.tts-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.tts-button {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.tts-button i {
    font-size: 18px;
}

.tts-button:hover {
    background-color: #e8e8e828;
    cursor: pointer;
    transform: translateY(-2px);
}

.tts-button:active {
    transform: translateY(0);
}

.tts-button i {
    margin-right: 8px;
}


.searches-left {
    font-size: 0.9em;
    color: var(--text-color);
    margin-right: 15px;
}

/* Add these styles to your existing CSS file */
#shr-container {
    text-align: center;
    margin-bottom: 10px;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.shr-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.shr-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.shr-button:hover {
    transform: translateY(-2px);
}

#shr-x {
    background-color: #000000;
}

#shr-reddit {
    background-color: #FF4500;
}

#shr-facebook {
    background-color: #4267B2;
}

#shr-linkedin {
    background-color: #0077B5;
}

.shr-button i {
    font-size: 18px;
}

/* Add this to your existing CSS */
#flag-button {
    left: calc(50% + 50px); /* Changed from +80px to +50px */
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 10;
}

#flag-button:hover {
    background-color: #e74c3c;
    opacity: 1;
}

/* Add styles for the flag modal */
.flag-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.flag-modal-content {
    background-color: var(--card-background);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    color: var(--text-color);
}

.flag-modal-content h2 {
    margin-top: 0;
}

.flag-modal-content textarea {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: var(--background-color);
    color: var(--text-color);
}

.flag-modal-content button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
}

.flag-modal-content button:hover {
    background-color: #3a7bc8;
}

.flag-modal-content .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.flag-modal-content .close:hover,
.flag-modal-content .close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Add these new styles at the end of your existing style.css file */

.home-page {
    background-color: var(--background-color);
    color: var(--text-color);
}

.home-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

.hero-section {
    text-align: center;
    margin-bottom: 60px;
}

.hero-section h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.hero-section p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.search-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-container input,
.search-container select,
.search-container button {
    font-size: 1em;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
}

.search-container input {
    flex-grow: 1;
    background-color: var(--card-background);
    color: var(--text-color);
}

.search-container select {
    background-color: var(--card-background);
    color: var(--text-color);
}

.search-container button {
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-container button:hover {
    background-color: #3a7bc8;
}

.features-section {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px; /* Add some space above the features section */
    margin-bottom: 60px;
}

.feature {
    text-align: center;
    max-width: 300px;
}

.feature i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.popular-words-section {
    text-align: center;
    margin-bottom: 60px; /* Add margin to the bottom */
}

.popular-words-section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

#popular-words {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px; /* Add some extra space at the bottom */
}

.popular-word {
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px; /* Add margin to the bottom of each word */
}

.popular-word:hover {
    background-color: var(--primary-color);
    color: white;
}

footer {
    background-color: var(--card-background);
    color: var(--text-color);
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
}

@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }

    .features-section {
        flex-direction: column;
        align-items: center;
    }

    .feature {
        max-width: 100%;
    }
}

/* You can also add a divider between sections if you'd like */
.section-divider {
    border: none;
    border-top: 1px solid var(--text-color);
    opacity: 0.2;
    margin: 40px 0;
}

/* Add these new styles at the end of your existing style.css file */

@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }

    .container {
        padding: 0 5px; /* Reduce padding on mobile */
    }

    .header-content {
        justify-content: center; /* Center content on mobile */
    }

    .header-right {
        margin-top: 10px; /* Add some space between title and right content on mobile */
        justify-content: center; /* Center the right content on mobile */
        width: 100%; /* Full width on mobile */
    }

    .searches-left {
        font-size: 0.8em; /* Reduce font size for mobile */
    }

    .theme-switch-wrapper {
        transform: scale(0.8); /* Make the theme switch smaller on mobile */
    }
}

/* Updated styles for the video control buttons */
.video-control-button {
    position: absolute;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.3); /* Increased opacity from 0.2 to 0.3 */
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.video-control-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    background-color: rgba(255, 255, 255, 0.25);
}

.video-control-button:active {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.video-control-button i,
.video-control-button svg {
    font-size: 20px;
    color: white;
    transition: all 0.3s ease;
}

/* Slow button */
#slow-button {
    left: calc(50% - 50px); /* Changed from -80px to -50px */
}

#slow-button.active {
    background-color: rgba(74, 144, 226, 0.7); /* Increased opacity from 0.6 to 0.7 */
}

#slow-button svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* Loop button */
#loop-button {
    left: 50%;
    transform: translateX(-50%);
}

#loop-button.active {
    background-color: rgba(39, 174, 96, 0.7); /* Increased opacity from 0.6 to 0.7 */
}

/* Flag button */
#flag-button {
    left: calc(50% + 50px); /* Changed from +80px to +50px */
    background-color: rgba(231, 76, 60, 0.7); /* Increased opacity from 0.6 to 0.7 */
}

#flag-button:hover {
    background-color: rgba(192, 57, 43, 0.7); /* Increased opacity from 0.6 to 0.7 */
}

/* Disabled state for slow and loop buttons */
#slow-button:not(.active),
#loop-button:not(.active) {
    background-color: rgba(0, 0, 0, 0.4); /* Increased opacity from 0.3 to 0.4 */
}

#slow-button:not(.active) svg,
#loop-button:not(.active) i {
    opacity: 0.9; /* Increased opacity from 0.7 to 0.9 */
}

/* Adjust the positioning for mobile devices */
@media (max-width: 768px) {
    .video-control-button {
        width: 36px;
        height: 36px;
    }

    #slow-button {
        left: calc(50% - 40px); /* Changed from -60px to -40px */
    }

    #flag-button {
        left: calc(50% + 40px); /* Changed from +60px to +40px */
    }

    .video-control-button i,
    .video-control-button svg {
        font-size: 18px;
    }

    #slow-button svg {
        width: 18px;
        height: 18px;
    }
}


/* Updated Volume control styles */
.volume-control {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    z-index: 10;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    gap: 0;
}

/* Add back hover styles */
@media (hover: hover) {
    .volume-control:hover {
        width: 160px;
        border-radius: 20px;
    }
    .volume-control:hover .volume-slider-container {
        width: 100px;
        margin-left: 8px;
        opacity: 1;
    }
}

/* Keep the active styles for click functionality */
.volume-control.active {
    width: 160px;
    border-radius: 20px;
}

.volume-control.active .volume-slider-container {
    width: 100px;
    margin-left: 8px;
    opacity: 1;
}

.volume-slider-container {
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-left: 0;
}

#volume-button.video-control-button {
    position: static;
    width: 40px; /* Match parent size */
    height: 40px; /* Match parent size */
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .volume-control {
        width: 36px;  /* Smaller for mobile */
        height: 36px;
    }

    .volume-control:hover,
    .volume-control.active {
        width: 140px;
    }

    #volume-button.video-control-button {
        width: 36px;
        height: 36px;
    }
}

.volume-slider {
    width: 100px; /* Reduced from implicit 200px */
    margin: auto;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
}

/* Add these styles for the accent buttons */
.tts-accent-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tts-accent-button {
    width: 35px; /* Increased from 30px */
    height: 35px; /* Increased from 30px */
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    background: none;
}

.tts-accent-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tts-accent-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tts-accent-button.active {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .tts-accent-button {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Update the TTS controls styles */
.tts-controls-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.tts-accent-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tts-accent-button {
    width: 30px; /* Slightly smaller flags */
    height: 30px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    background: none;
}

.tts-accent-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tts-accent-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tts-accent-button.active {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .tts-accent-button {
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

.tts-buttons-container {
    display: flex;
    gap: 15px;
}

/* Adjust for mobile screens */
@media (max-width: 768px) {
    .tts-controls-container {
        gap: 15px;
    }

    .tts-accent-button {
        width: 30px; /* Increased from 25px */
        height: 30px; /* Increased from 25px */
    }
}

/* Update the accent indicator styles */
.accent-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 4px; /* Minimal gap between flag and text */
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 2px 4px; /* Minimal padding */
    z-index: 9;
    font-size: 11px;
    color: white;
    transition: opacity 0.3s ease;
    border-top-right-radius: 8px; /* Only round the top-right corner */
}

.accent-indicator img {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    object-fit: cover;
}

/* Update mobile styles */
@media (max-width: 768px) {
    .accent-indicator {
        font-size: 10px;
        gap: 3px;
    }
    
    .accent-indicator img {
        width: 12px;
        height: 12px;
    }
}

/* Add these styles at the end of your style.css file */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    max-width: 400px;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    opacity: 0;
}

.toast.success {
    border-left: 4px solid #4CAF50;
}

.toast.error {
    border-left: 4px solid #f44336;
}

.toast.info {
    border-left: 4px solid var(--primary-color);
}

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

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

/* Add these styles at the end of your style.css file */

.site-footer {
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 20px 0;
    margin-top: 60px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-section ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .footer-section ul {
        flex-direction: column;
        gap: 10px;
    }
}

/* Keep these styles to ensure footer stays at bottom */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* About page styles */
.about-content {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin: 40px 0;
}

.about-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-content h3 {
    color: var(--primary-color);
    margin: 25px 0 15px;
}

.about-content p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.about-content ul {
    list-style-type: disc;
    margin-left: 20px;
    line-height: 1.6;
}

/* Contact page styles */
.contact-content {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin: 40px 0;
}

.contact-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 5px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #3a7bc8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .about-content,
    .contact-content {
        padding: 20px;
        margin: 20px 0;
    }
}

/* Add these to your existing CSS */
.contact-email {
    font-size: 1.2em;
    color: var(--primary-color);
    margin: 20px 0;
}

.privacy-content,
.terms-content {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    margin: 40px 0;
}

.privacy-content h2,
.terms-content h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.privacy-content h3,
.terms-content h3 {
    color: var(--primary-color);
    margin: 25px 0 15px;
}

.privacy-content p,
.terms-content p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.privacy-content ul,
.terms-content ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.privacy-content a,
.terms-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.privacy-content a:hover,
.terms-content a:hover {
    text-decoration: underline;
}

section {
    margin-bottom: 30px;
}

.page-content {
    flex: 1 0 auto;
    width: 100%;
}

.site-footer {
    flex-shrink: 0;
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 20px 0;
    margin-top: 60px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

/* Add these styles in the share buttons section */
.shr-button.shared {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #808080 !important; /* Override individual platform colors */
}

.shr-button.shared:hover {
    transform: none;
}

.shr-button:disabled {
    pointer-events: none;
}