/*
Theme Name: Tongue Twister
Theme URI: https://onlinetonguetwister.com/
Author: Your Name
Description: Custom theme for Online Tongue Twister clone
Version: 1.3
Requires at least: 5.0
Tested up to: 6.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tongue-twister
Tags: custom, tongue twister, education
*/

:root {
    --primary: #a47cff;
    --primary-light: #d1b3ff;
    --primary-dark: #7c4dff;
    --accent: #f8f3fc;
    --card-bg: #fff;
    --text-main: #2d1a3a;
    --text-muted: #7c6f92;
    --border: #e5d8fa;
    --shadow: 0 2px 16px rgba(164, 124, 255, 0.10);
    --radius: 10px;
    --radius-pill: 24px;
    --transition: 0.2s;
    --font-main: 'Inter', Arial, sans-serif;
}

body {
    font-family: var(--font-main);
    background: var(--accent);
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

main#homepage {
    max-width: 900px;
    margin: 2.5em auto 0 auto;
    padding: 0 1.5em 2em 1.5em;
}

header#site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1.5em 0 1em 0;
    margin-bottom: 2em;
    text-align: left;
}
.site-title a {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.site-title,
h1 span[style*="OnlineTongueTwister.com"] {
    font-family: 'Fredoka', 'Inter', Arial, sans-serif !important;
    letter-spacing: 0.01em;
}

.twister-tabs {
    margin-bottom: 2.5em;
}
.twister-tabs, .twister-difficulty {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1em;
    justify-content: center;
    align-items: center;
}
.twister-tabs .tab, .twister-difficulty .difficulty {
    background: #fff;
    border: 1.5px solid var(--primary-light);
    border-radius: 8px !important;
    padding: 0.5em 1.5em;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-dark);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    outline: none;
}
.twister-tabs .tab.selected, .twister-difficulty .difficulty.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(164, 124, 255, 0.10);
}
.twister-tabs .tab:hover, .twister-difficulty .difficulty:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.twister-focus {
    margin-bottom: 1.5em;
}
#focus-sound-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 1em;
    margin-bottom: 0.5em;
}
#focus-sound-checkboxes label {
    display: flex;
    align-items: center;
    font-size: 1rem;
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0.3em 1em;
    transition: background var(--transition), border-color var(--transition);
}
#focus-sound-checkboxes input[type="checkbox"] {
    accent-color: var(--primary);
    margin-right: 0.4em;
}

#twister-display {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: none;
    padding: 2em 1.5em 1.5em 1.5em;
    margin-bottom: 2em;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    text-align: center;
}
.twister-meta {
    margin-bottom: 0.5em;
    font-size: 0.95em;
    color: var(--primary-dark);
    font-weight: 600;
}
.twister-meta .meta {
    display: inline-block;
    margin-right: 0.7em;
    padding: 0.2em 0.8em;
    border-radius: var(--radius-pill);
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.95em;
}
.twister-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0.5em 0 0.2em 0;
}
.twister-content {
    font-size: 1.625rem;
    font-weight: 250;
    color: #111;
    font-family: 'Fredoka', 'Inter', Arial, sans-serif !important;
    border-radius: var(--radius);
    padding: 1em 1.2em;
    margin: 1em 0 1em 0;
    text-align: center;
    box-shadow: 0 2px 12px rgba(164, 124, 255, 0.07);
    letter-spacing: 0.01em;
}
.twister-tip {
    background: #f3e8ff;
    color: var(--primary-dark);
    border-radius: var(--radius);
    padding: 0.7em 1em;
    margin-bottom: 0.7em;
    font-size: 1em;
    border-left: 4px solid var(--primary);
}
.twister-focus-sounds {
    color: var(--text-muted);
    font-size: 0.98em;
    margin-bottom: 1em;
}
#speak-twister {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.5em 1.2em;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 1em;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
#speak-twister:hover {
    background: var(--primary);
    color: #fff;
}
.twister-speed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    margin-bottom: 1em;
}
#speech-speed {
    accent-color: var(--primary);
}
#try-another {
    background: #fff;
    color: var(--primary-dark);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-pill);
    padding: 0.5em 1.5em;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    margin-top: 0.5em;
}
#try-another:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: #eee !important;
    color: #aaa !important;
    border-color: #ccc !important;
}
#try-another:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
}

section#why-practice {
    background: linear-gradient(120deg, #f3e8ff 50%, #ffe3f3 85%, #fff 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2em 1.5em 1.5em 1.5em;
    margin-bottom: 2em;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
section#why-practice h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: 1em;
    text-align: center;
}
.benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    justify-content: center;
    margin-top: 1.5em;
}
.benefits > div {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2em 1.2em 1em 1.2em;
    min-width: 180px;
    flex: 1 1 180px;
    text-align: center;
    font-size: 1.05em;
    color: var(--text-main);
    font-weight: 500;
}

footer#site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 2em 0 1em 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 1em;
    margin-top: 2em;
}

/* Info Bar (Tip) */
.info-bar {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #f3e8ff 60%, #ffe3f3 90%, #f8f3fc 100%);
    color: var(--primary-dark);
    border-radius: 8px !important;
    padding: 0.7em 1.2em;
    font-size: 1.05em;
    margin-bottom: 1.2em;
    box-shadow: 0 1px 4px rgba(164, 124, 255, 0.06);
    gap: 0.7em;
    margin-top: 0.5em;
}
.info-bar .icon {
    font-size: 1.2em;
    margin-right: 0.5em;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-pill);
    font-size: 0.98em;
    font-weight: 600;
    padding: 0.2em 0.9em;
    margin-right: 0.5em;
    background: var(--primary-light);
    color: var(--primary-dark);
    gap: 0.4em;
}
.badge.easy { background: #e0f7fa; color: #00796b; }
.badge.medium { background: #fff3e0; color: #f57c00; }
.badge.hard { background: #ffe0e0; color: #d32f2f; }
.badge.expert { background: #ede7f6; color: #512da8; }
.badge .icon { font-size: 1.1em; }

/* Twister Card Gradient */
.twister-card-gradient {
    background: linear-gradient(120deg, #f3e8ff 50%, #ffe3f3 85%, #fff 100%);
    border-left: none;
    box-shadow: none;
}

/* Heart/Favorite Icon */
.icon-heart {
    color: #ff6b81;
    font-size: 1.3em;
    margin-left: 0.5em;
    vertical-align: middle;
}

/* Button Icons */
.icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.4em;
}

/* Divider */
.divider {
    border: none;
    border-top: 1.5px solid var(--border);
    margin: 2em 0 2em 0;
    width: 100%;
}

/* Tips/Favorites Grid */
.tips-grid, .favorites-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2em;
    margin-top: 1.5em;
    justify-content: center;
}
.tips-grid > div, .favorites-grid > div {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1em 1.1em 0.9em 1.1em;
    min-width: 180px;
    flex: 1 1 180px;
    text-align: left;
    font-size: 1.05em;
    color: var(--text-main);
    font-weight: 500;
    border-left: 4px solid var(--primary-light);
}
.tips-grid .icon, .favorites-grid .icon {
    margin-right: 0.7em;
    color: var(--primary-dark);
}

/* Footer Columns */
.footer-columns {
    display: flex;
    justify-content: space-between;
    gap: 2em;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto 1em auto;
    padding: 0 1em;
}
.footer-columns > div {
    flex: 1 1 200px;
    min-width: 180px;
    color: var(--text-muted);
    font-size: 1em;
    text-align: left;
}
.footer-columns h4 {
    color: var(--primary-dark);
    font-size: 1.1em;
    margin-bottom: 0.5em;
}
.footer-heart {
    color: #ff6b81;
    font-size: 1.1em;
    margin: 0 0.2em;
}

/* About Link */
.header-about {
    float: right;
    margin-top: 0.2em;
    margin-right: 2em;
    font-size: 1.05em;
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}
.header-about:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Card Hover/Active */
#twister-display:hover, .benefits > div:hover, .tips-grid > div:hover, .favorites-grid > div:hover {
    box-shadow: 0 6px 32px rgba(164, 124, 255, 0.13);
    transform: translateY(-2px) scale(1.01);
    transition: box-shadow 0.2s, transform 0.2s;
}

/* Responsive Tweaks */
@media (max-width: 700px) {
    main#homepage, section#why-practice, section#practice-tips, section#about {
        max-width: 100%;
        padding: 0 0.5em 1em 0.5em;
    }
    #twister-display {
        padding: 1em 0.5em 1em 0.5em;
        max-width: 100vw;
    }
    .benefits {
        flex-direction: column;
        gap: 1em;
    }
    .footer-columns {
        flex-direction: column;
        gap: 1em;
        text-align: center;
    }
    .footer-columns > div {
        text-align: center;
    }
    .twister-tabs, .twister-difficulty {
        flex-wrap: wrap;
        justify-content: center;
    }
    .twister-tabs .tab, .twister-difficulty .difficulty, .focus-dropdown-toggle {
        font-size: 1em;
        padding: 0.5em 1em;
        min-width: 90px;
    }
    .twister-focus {
        margin-bottom: 1em;
    }
    .focus-dropdown-container {
        max-width: 100%;
    }
    .focus-dropdown-toggle {
        font-size: 1em;
        padding: 0.6em 1em;
    }
    .focus-sound-options {
        max-height: 120px;
        font-size: 0.98em;
    }
    .twister-content {
        font-size: 1.1rem;
        padding: 0.7em 0.5em;
        margin: 0.7em 0 0.7em 0;
        word-break: break-word;
    }
    .twister-practice-label {
        font-size: 0.98rem;
        margin: 0.7em 0 0.2em 0;
    }
    #site-header img {
        height: 2.2em !important;
        max-width: 90vw;
    }
    #site-header > div {
        min-height: 3.5em !important;
    }
    .header-about {
        font-size: 1em;
        margin-right: 0.7em;
        margin-top: 0.2em;
    }
    .twister-tip {
        font-size: 0.98em;
        padding: 0.5em 0.7em;
    }
    .twister-meta .meta, .badge {
        font-size: 0.95em;
        padding: 0.15em 0.7em;
    }
    #try-another, #speak-twister {
        font-size: 1em;
        padding: 0.5em 1em;
        min-width: 120px;
    }
    .twister-speed {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }
    html, body {
        overflow-x: hidden;
    }
}

html {
    scroll-behavior: smooth;
}

/* Focus Sound Dropdown Styles */
.focus-dropdown-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto 1.2em auto;
}
.focus-dropdown-toggle {
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--primary-light);
    border-radius: 8px !important;
    padding: 0.7em 1.2em;
    font-size: 1.08em;
    font-weight: 500;
    color: var(--primary-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    box-shadow: 0 1px 6px rgba(164, 124, 255, 0.07);
    outline: none;
    gap: 0.7em;
}
.focus-dropdown-toggle .icon {
    font-size: 1.2em;
    margin-right: 0.7em;
}
.focus-dropdown-toggle .chevron {
    font-size: 1.1em;
    margin-left: auto;
    transition: transform 0.2s;
}
.focus-dropdown-toggle.active .chevron {
    transform: rotate(180deg);
}
.focus-dropdown-menu {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--primary-light);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(164, 124, 255, 0.13);
    padding: 1em 1em 0.7em 1em;
    z-index: 10;
    margin-top: 0.2em;
}

#focus-sound-dropdown {
    width: 100%;
    min-height: 2.5em;
    font-size: 1em;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #f8f3fc;
    color: var(--primary-dark);
    padding: 0.5em;
    outline: none;
    box-shadow: none;
    transition: border-color var(--transition);
}
#focus-sound-dropdown:focus {
    border-color: var(--primary);
}
@media (max-width: 700px) {
    .focus-dropdown-container {
        max-width: 100%;
    }
}

.focus-dropdown-toggle .selected-summary {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--radius-pill);
    padding: 0.15em 0.7em;
    font-size: 0.97em;
    font-weight: 500;
    margin-left: 0.7em;
    margin-right: 0.2em;
    display: inline-block;
    vertical-align: middle;
}

.focus-sound-options {
    max-height: 140px;
    min-width: 100%;
    overflow-y: scroll;
    background: #f8f3fc;
    border-radius: var(--radius);
    border: 1px solid var(--primary-light);
    padding: 0.5em 0.7em;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) #f8f3fc;
}
.focus-sound-options::-webkit-scrollbar {
    width: 8px;
}
.focus-sound-options::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 8px;
}
.focus-sound-options::-webkit-scrollbar-track {
    background: #f8f3fc;
    border-radius: 8px;
}
.focus-sound-option-label {
    font-size: 1em;
    color: var(--primary-dark);
    padding: 0.2em 0.2em 0.2em 0.1em;
    border-radius: 6px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.focus-sound-option-label:hover {
    background: var(--primary-light);
}
.focus-sound-option-checkbox {
    accent-color: var(--primary);
    margin-right: 0.5em;
}

section#practice-tips {
    background: linear-gradient(120deg, #fff 40%, #ffe3f3 80%, #f3e8ff 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2em 1.5em 1.5em 1.5em;
    margin-bottom: 2em;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

section#about {
    background: linear-gradient(120deg, #f3e8ff 50%, #ffe3f3 85%, #fff 100%);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2em 1.5em 1.5em 1.5em;
    margin-bottom: 2em;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.twister-practice-label {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 1.1em 0 0.2em 0;
    text-align: center;
    letter-spacing: 0.01em;
    opacity: 0.85;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0;
}

#speak-twister, #try-another {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
} 