/*
Theme Name: Slanglish
Theme URI: https://slanglish.com
Author: Your Name
Author URI: https://slanglish.com
Description: A modern WordPress theme for decoding and understanding contemporary slang. Perfect for parents and anyone wanting to stay current with youth language.
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: slanglish
Tags: custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, blog, custom-colors, one-column, two-columns, right-sidebar, flexible-header, accessibility-ready
*/

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

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

:root {
    --primary-purple: #6B46C1;
    --dark-purple: #4C1D95;
    --light-purple: #A78BFA;
    --lighter-purple: #E9D5FF;
    --orange: #F97316;
    --orange-dark: #EA580C;
    --teal: #14B8A6;
    --blue: #3B82F6;
    --red: #EF4444;
    --green: #10B981;
    --yellow: #F59E0B;
    --white: #FFFFFF;
    --light-gray: #F3F4F6;
    --gray: #6B7280;
    --dark-gray: #1F2937;
    --text-dark: #111827;
    --text-gray: #4B5563;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

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

a:hover {
    color: var(--dark-purple);
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--dark-purple) 100%);
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
    box-sizing: border-box;
}

.site-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.site-logo a {
    color: var(--white);
}

.site-logo a:hover {
    color: var(--lighter-purple);
}

.site-logo-img {
    display: block;
    height: 2.5rem;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    object-position: left center;
}

.header-search {
    flex: 1;
    max-width: 500px;
    display: flex;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
    background-size: 1.25rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.search-input:focus {
    outline: 2px solid var(--light-purple);
    outline-offset: 2px;
}

.search-button,
.browse-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-button {
    background: var(--primary-purple);
    color: var(--white);
}

.search-button:hover {
    background: var(--dark-purple);
}

.browse-button {
    background: var(--white);
    color: var(--primary-purple);
}

.browse-button:hover {
    background: var(--light-purple);
    color: var(--white);
}

.main-navigation {
    width: 100%;
    box-sizing: border-box;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 0;
}

.main-navigation a:hover {
    color: var(--lighter-purple);
}

/* Hero Section */
.hero-section {
    padding: 0.75rem 2rem 2rem 2rem;
    text-align: center;
    /* Hero background image */
    background-image: url('assets/hero-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    min-height: 475px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure text is readable over the background */
.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title,
.hero-subtitle,
.hero-tagline {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Custom background image from Customizer */
.hero-section.has-custom-bg {
    /* Background image applied via inline CSS from Customizer */
}

/* Subtle overlay for text readability */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15); /* Light white overlay for text contrast */
    z-index: 1;
    pointer-events: none;
}

/* Customizer background override */
.hero-section.has-custom-bg::after {
    background: rgba(107, 70, 193, var(--hero-overlay-opacity, 0.2));
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark-purple);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--dark-purple);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-tagline {
    color: var(--gray);
    font-style: italic;
    font-size: 0.95rem;
}

/* Below-hero wrap: wave background for all content under the hero */
.below-hero-wrap {
    background-image: url('assets/wave-background.png');
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    background-color: #f8f5fc;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Section Styles */
.section {
    padding: 2rem 2rem;
    width: 100%;
    box-sizing: border-box;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-purple);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::after {
    content: '...';
    color: var(--gray);
    font-weight: 300;
}

/* Trending Cards */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: start;
}

@media (min-width: 1140px) {
    .trending-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.trending-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    touch-action: manipulation;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    max-width: 100%;
    height: 100%;
}

.trending-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.trending-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.trending-card:nth-child(1) { animation-delay: 0.05s; }
.trending-card:nth-child(2) { animation-delay: 0.1s; }
.trending-card:nth-child(3) { animation-delay: 0.15s; }
.trending-card:nth-child(4) { animation-delay: 0.2s; }
.trending-card:nth-child(5) { animation-delay: 0.25s; }
.trending-card:nth-child(6) { animation-delay: 0.3s; }
.trending-card:nth-child(7) { animation-delay: 0.35s; }
.trending-card:nth-child(8) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trending-card-header {
    padding: 1.25rem 1.5rem;
    min-height: 5rem;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--light-purple) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.trending-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='%23A78BFA' fill-opacity='0.1'/%3E%3Cpath d='M20 20h60v60H20z' fill='%236B46C1' fill-opacity='0.1'/%3E%3C/svg%3E");
    opacity: 0.3;
}

/* Green header (safe) */
.trending-header-green {
    background: linear-gradient(135deg, var(--green) 0%, #34D399 100%) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.trending-header-green::before {
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='%2310B981' fill-opacity='0.15'/%3E%3Cpath d='M20 20h60v60H20z' fill='%2334D399' fill-opacity='0.15'/%3E%3C/svg%3E");
    opacity: 0.4;
}

.trending-header-green::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

/* Yellow header (caution) */
.trending-header-yellow {
    background: linear-gradient(135deg, var(--yellow) 0%, #FCD34D 100%) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.trending-header-yellow::before {
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='%23F59E0B' fill-opacity='0.15'/%3E%3Cpath d='M20 20h60v60H20z' fill='%23FCD34D' fill-opacity='0.15'/%3E%3C/svg%3E");
    opacity: 0.4;
}

.trending-header-yellow::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: pulse 2.5s ease-in-out infinite;
}

/* Red header (red flag) */
.trending-header-red {
    background: linear-gradient(135deg, var(--red) 0%, #F87171 100%) !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.trending-header-red::before {
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='%23EF4444' fill-opacity='0.15'/%3E%3Cpath d='M20 20h60v60H20z' fill='%23F87171' fill-opacity='0.15'/%3E%3C/svg%3E");
    opacity: 0.4;
}

.trending-header-red::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* Safety icon in body (lower right corner) */
.safety-icon-body {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(107, 70, 193, 0.15);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.safety-icon-body svg {
    color: var(--primary-purple);
}

.safety-icon-body.safety-icon-safe {
    background: rgba(16, 185, 129, 0.15);
}

.safety-icon-body.safety-icon-safe svg {
    color: var(--green);
}

.safety-icon-body.safety-icon-warning {
    background: rgba(245, 158, 11, 0.15);
}

.safety-icon-body.safety-icon-warning svg {
    color: var(--yellow);
}

.safety-icon-body.safety-icon-red {
    background: rgba(239, 68, 68, 0.15);
}

.safety-icon-body.safety-icon-red svg {
    color: var(--red);
}

.trending-card-body {
    padding: 1.5rem;
    position: relative;
    border-top: 1px solid var(--light-gray);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.trending-term {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--white);
    position: relative;
    z-index: 1;
    text-align: left;
    margin: 0;
    flex: 1;
    min-width: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.trending-definition {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.trending-category {
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: auto;
}

/* Category Filter Links */
.category-filters {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.category-filters .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    text-decoration: none;
    background: #f3f4f6;
    color: #1f2937;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.category-filters .btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-filters .btn.btn-primary,
.category-filters .btn-primary {
    background: var(--primary-purple);
    color: white;
}

.category-filters .btn.btn-primary:hover,
.category-filters .btn-primary:hover {
    background: var(--dark-purple);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 70, 193, 0.3);
}

/* Safety icon in body (legacy - keeping for compatibility) */
.safety-icon {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.safety-icon.safe {
    background: var(--green);
}

.safety-icon.safe svg {
    stroke: var(--white);
}

.safety-icon.warning {
    background: var(--yellow);
}

.safety-icon.warning svg {
    stroke: var(--text-dark);
    fill: var(--text-dark);
}

/* Featured Slang Section */
.featured-slang {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

.featured-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-purple);
    margin: 0;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-purple);
    background: var(--white);
    border: 2px solid var(--primary-purple);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.btn-save:hover {
    background: var(--lighter-purple);
    color: var(--dark-purple);
}

.btn-save.is-saved {
    background: var(--primary-purple);
    color: var(--white);
    border-color: var(--primary-purple);
}

.btn-save.is-saved:hover {
    background: var(--dark-purple);
    border-color: var(--dark-purple);
    color: var(--white);
}

.save-icon {
    font-size: 1.1em;
    line-height: 1;
}

.featured-definition {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.example-box {
    background: var(--lighter-purple);
    border-left: 4px solid var(--primary-purple);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
}

.example-box strong {
    color: var(--primary-purple);
}

.tips-list {
    list-style: none;
}

.tips-list li {
    padding: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tips-list li::before {
    content: '✓';
    color: var(--green);
    font-weight: bold;
    font-size: 1.25rem;
}

/* Saved page */
.saved-page .saved-header {
    margin-bottom: 2rem;
}

.saved-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-purple);
    margin: 0 0 0.5rem;
}

.saved-tagline {
    color: var(--text-gray);
    margin: 0;
    font-size: 1.05rem;
}

.saved-terms-grid {
    position: relative;
}

.saved-loading {
    color: var(--text-gray);
    margin: 2rem 0;
}

.saved-empty {
    margin: 2rem 0;
}

.saved-empty p {
    color: var(--text-gray);
    margin: 0 0 1rem;
}

.saved-empty strong {
    color: var(--dark-purple);
}

#saved-terms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.saved-term-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.saved-term-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.saved-term-card .trending-card-body {
    padding: 1.5rem;
    border-top: none;
}

.saved-term-card .trending-term {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
}

.saved-term-card .trending-definition {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.saved-term-card .trending-category {
    font-size: 0.875rem;
    color: var(--primary-purple);
    margin-top: auto;
}

/* Parent Tools - horizontal chip strip */
.section-featured-tools .featured-slang {
    margin-bottom: 1.5rem;
}

.parent-tools-strip {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--dark-purple) 100%);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    color: var(--white);
}

.parent-tools-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--white);
    opacity: 0.95;
}

.parent-tools-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.parent-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.parent-chip:hover {
    background: rgba(255, 255, 255, 0.35);
    color: var(--white);
}

.parent-chip .chip-count {
    font-size: 0.75rem;
    opacity: 0.85;
}

.parent-chip-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.parent-chip-outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

.parent-chip-watch {
    background: var(--red);
}

.parent-chip-watch:hover {
    background: #dc2626;
    color: var(--white);
}

/* Legacy tool-icon (kept for backwards compat) */
.tool-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.tool-icon.teal { background: var(--teal); }
.tool-icon.blue { background: var(--blue); }
.tool-icon.orange { background: var(--orange); }
.tool-icon.red { background: var(--red); }

/* Games Section */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: start;
}

.game-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    min-height: 250px;
    min-width: 0;
    max-width: 100%;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.game-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }

.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.game-card-header {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--light-purple) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    pointer-events: none;
}

.game-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='%23A78BFA' fill-opacity='0.1'/%3E%3Cpath d='M20 20h60v60H20z' fill='%236B46C1' fill-opacity='0.1'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}

.game-card.purple .game-card-header {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--light-purple) 100%);
}

.game-card.orange .game-card-header {
    background: linear-gradient(135deg, var(--orange) 0%, #FB923C 100%);
}

.game-card.red .game-card-header {
    background: linear-gradient(135deg, var(--red) 0%, #F87171 100%);
}

.game-card-body {
    padding: 1.5rem;
    position: relative;
    border-top: 1px solid var(--light-gray);
    flex: 1;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.game-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.75rem;
    position: relative;
    z-index: 1;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.game-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    text-align: center;
    position: relative;
    z-index: 1;
    margin: 0;
}

/* Smaller title when image is present */
.game-card-header .game-image + .game-title,
.game-card-header:has(.game-image) .game-title {
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

.game-description {
    font-size: 1rem;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.5;
}

/* Submit Section (Homepage CTA) */
.submit-section {
    background: linear-gradient(135deg, var(--lighter-purple) 0%, rgba(167, 139, 250, 0.15) 100%);
    padding: 2rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 1.5rem 0;
    border: 2px solid var(--light-purple);
}

.submit-section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark-purple);
    margin-bottom: 0.75rem;
}

.submit-text {
    font-size: 1.15rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
}

.btn-submit-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: var(--primary-purple);
    color: white;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-submit-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.35);
    color: white;
}

/* Submit Slang Page */
.submit-slang-page .container {
    max-width: 640px;
}

.submit-slang-wrap {
    padding: 2rem 0 4rem;
}

.submit-slang-header {
    text-align: center;
    margin-bottom: 2rem;
}

.submit-slang-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
}

.submit-slang-tagline {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.submit-message {
    padding: 1.25rem 1.5rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.submit-message-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.submit-message--success {
    background: rgba(16, 185, 129, 0.15);
    color: #065f46;
    border: 2px solid var(--green);
}

.submit-message--error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 2px solid var(--red);
}

.submit-message--warning {
    background: rgba(245, 158, 11, 0.15);
    color: #92400e;
    border: 2px solid var(--yellow);
}

.submit-fun-fact {
    background: var(--light-gray);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-purple);
}

.submit-fun-fact-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-purple);
    margin-bottom: 0.35rem;
}

.submit-fun-fact p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.45;
}

.slang-submit-form .submit-field {
    margin-bottom: 1.5rem;
}

.slang-submit-form .submit-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.slang-submit-form label {
    display: block;
    font-weight: 600;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
}

.slang-submit-form .required {
    color: var(--red);
}

.slang-submit-form .optional {
    font-weight: 400;
    color: var(--gray);
    font-size: 0.9em;
}

.slang-submit-form input[type="text"],
.slang-submit-form input[type="email"],
.slang-submit-form textarea,
.slang-submit-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--light-purple);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.slang-submit-form input:focus,
.slang-submit-form textarea:focus,
.slang-submit-form select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.2);
}

.slang-submit-form .submit-field-help {
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.submit-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 560px) {
    .submit-row {
        grid-template-columns: 1fr;
    }
}

.submit-actions {
    margin-top: 2rem;
}

.btn-submit-slang {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--light-purple) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit-slang:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 70, 193, 0.35);
}

.btn-submit-slang:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

a.btn-submit-slang {
    display: inline-block;
    width: auto;
    text-decoration: none;
    text-align: center;
    color: white;
}

a.btn-submit-slang:hover {
    color: white;
}

/* Footer */
.site-footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 3rem 2rem 2rem;
    text-align: center;
}

/* Archive filter bar - horizontal scroll on mobile */
.archive-filter-bar {
    margin-bottom: 1.75rem;
    overflow: hidden;
}

.archive-filter-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

@media (max-width: 640px) {
    .archive-filter-scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        margin: 0 -0.5rem;
    }
    .archive-filter-scroll::-webkit-scrollbar {
        height: 4px;
    }
}

.archive-filter-chip {
    display: inline-block;
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    background: var(--light-gray);
    color: var(--dark-gray);
    border-radius: 2rem;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.archive-filter-chip:hover {
    background: var(--lighter-purple);
    color: var(--primary-purple);
}

.archive-filter-chip.is-active {
    background: var(--primary-purple);
    color: var(--white);
}

.archive-filter-chip.is-active:hover {
    background: var(--dark-purple);
    color: var(--white);
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-section {
        min-height: 400px;
        padding: 2rem 1rem;
    }
    
    .header-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
        gap: 0.5rem;
    }
    
    .site-header {
        padding: 1rem 0;
    }
    
    .header-search {
        max-width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .search-input {
        width: 100%;
        min-width: 0;
    }
    
    .search-button,
    .browse-button {
        flex: 1;
        min-width: 0;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .main-navigation {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin-top: 0;
    }
    
    .main-navigation::-webkit-scrollbar {
        display: none;
    }
    
    .main-navigation ul {
        display: flex;
        gap: 1rem;
        padding: 0;
        margin: 0;
        white-space: nowrap;
        min-width: max-content;
    }
    
    .main-navigation li {
        flex-shrink: 0;
    }
    
    .main-navigation a {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .trending-grid,
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 2rem 1rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Games Styles */
.slang-games {
    display: grid;
    gap: 1rem;
}

.slang-game {
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    background: var(--white);
}

.slang-match {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.slang-match__col h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
}

.slang-match__list {
    display: grid;
    gap: 0.5rem;
}

.slang-chip {
    padding: 0.625rem 0.75rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--white);
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    color: var(--text-dark);
}

.slang-chip:hover {
    background: var(--lighter-purple);
    border-color: var(--primary-purple);
}

.slang-chip.is-picked {
    outline: 2px solid var(--primary-purple);
    background: var(--lighter-purple);
    border-color: var(--primary-purple);
}

.slang-match__status {
    margin-top: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-purple);
    text-align: center;
}

.slang-btn {
    padding: 0.625rem 0.875rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-purple);
    margin-top: 0.75rem;
}

.slang-btn:hover {
    background: var(--lighter-purple);
    border-color: var(--primary-purple);
}

.slang-btn--ghost {
    opacity: 0.9;
}

.slang-draw {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    background: rgba(0, 0, 0, 0.03);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Use It in a Sentence game */
.sentence-game-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.sentence-instruction {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.sentence-draw-btn,
.sentence-next-btn {
    font-size: 1.1rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.sentence-term-box {
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.08) 0%, rgba(167, 139, 250, 0.08) 100%);
    text-align: center;
}

.sentence-term-big {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-purple);
    display: block;
    margin-bottom: 0.5rem;
}

.sentence-hint {
    color: var(--text-gray);
    font-style: italic;
}

.sentence-input-wrap label {
    display: block;
    font-weight: 600;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
}

.sentence-input-wrap .sentence-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    margin-bottom: 1rem;
    min-height: 80px;
    resize: vertical;
}

.sentence-input-wrap .sentence-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 2px rgba(107, 70, 193, 0.2);
}

.sentence-reveal-btn {
    margin-bottom: 1rem;
}

.sentence-reveal-box {
    margin-top: 1rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background: var(--lighter-purple);
    border: 1px solid rgba(107, 70, 193, 0.2);
}

.sentence-reveal-term {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-purple);
    margin: 0 0 0.5rem 0;
}

.sentence-meaning-label {
    font-weight: 700;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
}

.sentence-meaning {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.sentence-feedback {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.sentence-next-btn {
    margin-top: 0.5rem;
}

@media (max-width: 720px) {
    .slang-match {
        grid-template-columns: 1fr;
    }
}

/* About Page */
.about-page {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem 0;
}

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

.about-header .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
}

.about-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
    position: relative;
}

.about-graphic-wrapper {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-graphic {
    position: relative;
    width: 336px;
    max-width: 336px;
    margin: 0 auto;
    animation: attention-jitter 8s ease-in-out infinite;
}

.about-graphic::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(107, 70, 193, 0.1) 0%, rgba(167, 139, 250, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulse 4s ease-in-out infinite;
}

.about-graphic img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(107, 70, 193, 0.2));
}

.about-graphic:hover img {
    transform: scale(1.05) rotate(2deg);
}

.about-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
}

.about-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(107, 70, 193, 0.05) 0%, rgba(167, 139, 250, 0.05) 100%);
    border-radius: var(--border-radius);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.about-content:hover::before {
    opacity: 1;
}

.about-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes attention-jitter {
    0%, 85% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    86% {
        transform: translate(-2px, -3px) rotate(-1deg) scale(1.02);
    }
    87% {
        transform: translate(3px, 2px) rotate(1deg) scale(1.02);
    }
    88% {
        transform: translate(-2px, 3px) rotate(-1deg) scale(1.02);
    }
    89% {
        transform: translate(2px, -2px) rotate(1deg) scale(1.02);
    }
    90% {
        transform: translate(-3px, 2px) rotate(-1deg) scale(1.02);
    }
    91% {
        transform: translate(2px, 3px) rotate(1deg) scale(1.02);
    }
    92% {
        transform: translate(-2px, -2px) rotate(-1deg) scale(1.02);
    }
    93% {
        transform: translate(3px, -3px) rotate(1deg) scale(1.02);
    }
    94% {
        transform: translate(-3px, 3px) rotate(-1deg) scale(1.02);
    }
    95%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
}

/* Pause animation when dragging */
.about-graphic.dragging {
    animation: none;
}

@media (max-width: 968px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-graphic-wrapper {
        position: relative;
        min-height: 250px;
    }
    
    .about-graphic {
        max-width: 300px;
        width: 300px;
    }
}

@media (max-width: 768px) {
    .about-header .section-title {
        font-size: 2rem;
    }
    
    .about-graphic {
        max-width: 240px;
        width: 240px;
    }
    
    .about-content {
        padding: 1.5rem;
    }
    
    .about-content p {
        font-size: 1rem;
    }
}

/* Slanglish University Page */
.university-page {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 0;
}

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

.university-header .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-purple);
    margin-bottom: 1.5rem;
}

.university-intro {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-dark);
    max-width: 800px;
    margin: 0 auto;
    font-style: italic;
}

.university-games {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.university-game-card {
    display: flex;
    flex-direction: column;
}

.university-game-header {
    background: transparent !important;
    padding: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.university-game-header::before {
    display: none;
}

.university-game-image {
    width: 100%;
    height: 200px;
    display: block;
    object-fit: contain;
}

@media (max-width: 968px) {
    .university-games {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .university-intro {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .university-header .section-title {
        font-size: 2rem;
    }
    
    .university-intro {
        font-size: 1rem;
    }
}
