/* ========== ROOT VARIABLES - LIGHT MODE ========== */
:root {
    --primary: #e91e63;
    --primary-dark: #c2185b;
    --primary-light: #fce4ec;
    --primary-lighter: #fff0f5;
    --secondary: #ff4081;
    --accent: #ff6b9d;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --info: #2196f3;
    --bg-gradient: linear-gradient(135deg, #fff5f8 0%, #ffe0ec 50%, #ffd6e7 100%);
    --card-bg: #ffffff;
    --text-primary: #2d2d2d;
    --text-secondary: #666666;
    --text-muted: #999999;
    --shadow-sm: 0 2px 8px rgba(233, 30, 99, 0.08);
    --shadow: 0 8px 32px rgba(233, 30, 99, 0.12);
    --shadow-lg: 0 16px 48px rgba(233, 30, 99, 0.18);
    --shadow-hover: 0 12px 40px rgba(233, 30, 99, 0.2);
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-color: #f0e0e8;
    --input-bg: #fafafa;
    --input-border: #e8e8e8;
    --hover-bg: #fff5f8;
    --bronze: #cd7f32;
    --silver: #c0c0c0;
    --gold: #ffd700;
    --platinum: #e5e4e2;
    --diamond: #b9f2ff;
    --about-section-bg: linear-gradient(135deg, rgba(233, 30, 99, 0.03), rgba(255, 64, 129, 0.02));
    --about-section-border: rgba(233, 30, 99, 0.1);
    --about-section-shadow: 0 4px 16px rgba(233, 30, 99, 0.08);
}

/* ========== DARK MODE VARIABLES ========== */
[data-theme="dark"] {
    --primary: #f472b6;
    --primary-dark: #ec4899;
    --primary-light: #3d1f2e;
    --primary-lighter: #2d1520;
    --secondary: #fb7185;
    --accent: #f9a8d4;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
    --bg-gradient: linear-gradient(135deg, #0f0f14 0%, #1a1a24 50%, #151520 100%);
    --card-bg: #1e1e2a;
    --text-primary: #f1f1f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 12px 40px rgba(244, 114, 182, 0.15);
    --border-color: #2d2d3a;
    --input-bg: #252532;
    --input-border: #3d3d4a;
    --hover-bg: #2a2a38;
    --about-section-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    --about-section-border: rgba(255, 255, 255, 0.1);
    --about-section-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== FLOATING HEARTS ANIMATION ========== */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.heart {
    position: absolute;
    font-size: 20px;
    animation: floatUp 20s linear infinite;
    opacity: 0;
    filter: blur(0.5px);
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0);
        opacity: 0;
    }

    5% {
        opacity: 0.6;
    }

    10% {
        transform: translateY(80vh) rotate(45deg) scale(1);
        opacity: 0.5;
    }

    50% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100px) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

[data-theme="dark"] .heart {
    opacity: 0;
    filter: blur(1px);
}

/* ========== NAVIGATION ========== */
.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(233, 30, 99, 0.08);
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(30, 30, 42, 0.95);
    border-bottom-color: var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.logo-container {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 1.8rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.15);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.1);
    }
}

.logo-text {
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.nav-links a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-lighter) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-links a:hover {
    color: var(--primary-dark);
}

.nav-links a:hover::before {
    opacity: 1;
}

[data-theme="dark"] .nav-links a {
    color: var(--text-primary);
}

[data-theme="dark"] .nav-links a:hover {
    color: var(--primary);
}

/* Standard Dropdown Menus */
.nav-links .dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-toggle .arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin-top: 8px;
    border: 1px solid var(--border-color);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 0;
    white-space: nowrap;
    font-size: 0.95rem;
}

.dropdown-menu a::before {
    display: none;
}

.dropdown-menu a:hover {
    background: var(--primary-lighter);
    color: var(--primary-dark);
}

[data-theme="dark"] .dropdown-menu {
    background: var(--input-bg);
    border-color: var(--input-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .dropdown-menu a:hover {
    background: var(--hover-bg);
    color: var(--primary);
}

/* Mobile adjustments for dropdowns */
@media (max-width: 968px) {
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        margin-top: 0;
        padding: 0;
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .dropdown-menu a {
        padding-left: 40px;
    }
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    min-width: 40px;
    min-height: 40px;
}

.hamburger:hover {
    background: var(--primary-light);
}

.hamburger span {
    width: 22px;
    height: 2.5px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== CONTAINER ========== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    position: relative;
    z-index: 1;
}

/* ========== HERO SECTION ========== */
.hero {
    text-align: center;
    margin-bottom: 25px;
    padding: 25px 0;
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 40%, var(--accent) 70%, var(--primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
    line-height: 1.3;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========== ULTRA MINI GAMIFICATION BAR ========== */
.gamification-bar {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(233, 30, 99, 0.08);
    box-shadow: var(--shadow-sm);
}

/* ========== MINI SINGLE LINE ITEMS ========== */
.gamification-bar * {
    margin: 0;
    padding: 0;
}

/* ========== LEVEL (MINI) ========== */
.user-level {
    display: flex;
    align-items: center;
    gap: 4px;
}

.level-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--primary-lighter);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.level-icon {
    font-size: 1rem;
}

.level-points {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Mini Progress Bar */
.level-progress {
    height: 4px;
    width: 60px;
    background: var(--input-bg);
    border-radius: 50px;
    overflow: hidden;
}

.level-progress-fill {
    height: 100%;
    background: var(--primary);
    width: 40%;
    transition: width 0.5s ease;
}

/* ========== MINI STREAK ========== */
.streak-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ffe8cc;
    padding: 4px 8px;
    border-radius: 20px;
}

.streak-icon {
    font-size: 1.1rem;
}

.streak-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ff6b35;
}

.streak-label {
    font-size: 0.6rem;
    color: #555;
}

/* ========== MINI ACHIEVEMENTS ========== */
.achievements-mini {
    display: flex;
    align-items: center;
}

.achievements-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.7rem;
    background: var(--gold-light);
    border-radius: 20px;
    border: none;
    cursor: pointer;
}

.achievement-icon {
    font-size: 1rem;
}

.achievement-count {
    font-size: 0.75rem;
}

/* ========== MOBILE SUPER COMPACT ========== */
@media (max-width: 768px) {
    .gamification-bar {
        padding: 6px 10px;
        gap: 6px;
    }

    .level-badge {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    .level-progress {
        width: 50px;
        height: 3px;
    }

    .streak-counter {
        padding: 3px 6px;
    }

    .achievements-btn {
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    .achievement-icon,
    .streak-icon,
    .level-icon {
        font-size: 0.9rem;
    }
}

/* DARK MODE */
[data-theme="dark"] .gamification-bar {
    background: var(--card-bg);
}

[data-theme="dark"] .streak-counter {
    background: var(--primary-light);
}


/* ========== ACHIEVEMENTS PANEL ========== */
.achievements-panel {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(233, 30, 99, 0.08);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.achievements-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.achievements-header h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
}

/* ========== ABOUT SECTION CONTAINER ========== */
.about-section-container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.about-section-content {
    line-height: 1.8;
    color: var(--text-primary);
}

.about-section-tip {
    margin-top: 30px;
    font-style: italic;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .about-section-container {
        padding: 24px;
        border-radius: 16px;
    }
}

.close-achievements {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-achievements:hover {
    background: var(--hover-bg);
    color: var(--danger);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.achievement-card {
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-card.unlocked {
    opacity: 1;
    filter: grayscale(0);
    background: linear-gradient(135deg, var(--primary-lighter) 0%, #fff5f8 100%);
    border-color: var(--primary);
    animation: achievementUnlock 0.6s ease;
}

@keyframes achievementUnlock {
    0% {
        transform: scale(0.8) rotate(-5deg);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.15);
}

.achievement-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.achievement-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.achievement-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

[data-theme="dark"] .achievements-panel {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .achievement-card {
    background: var(--input-bg);
    border-color: var(--input-border);
}

[data-theme="dark"] .achievement-card.unlocked {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-lighter) 100%);
}

/* ========== MAIN GENERATOR CARD ========== */
.generator-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 35px;
    box-shadow: var(--shadow);
    margin-bottom: 35px;
    border: 1px solid rgba(233, 30, 99, 0.08);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.generator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    background-size: 300% 100%;
    animation: gradientMove 5s ease infinite;
}

@keyframes gradientMove {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.generator-card:hover {
    box-shadow: var(--shadow-hover);
}

[data-theme="dark"] .generator-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

/* ========== SECTION HEADERS ========== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--primary-light);
    position: relative;
    flex-wrap: wrap;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h3 {
    font-size: clamp(1rem, 3vw, 1.15rem);
    font-weight: 700;
    color: var(--text-primary);
}

.section-header .icon {
    font-size: 1.4rem;
    animation: bounce 2s ease infinite;
    flex-shrink: 0;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

[data-theme="dark"] .section-header {
    border-bottom-color: var(--border-color);
}

/* ========== DARK MODE TOGGLE (Extreme Fix) ========== */
.dark-mode-toggle {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #2d2d2d !important; /* Force visibility in light mode */
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 !important;
    position: relative;
    flex-shrink: 0;
    z-index: 1001;
}

.dark-mode-toggle:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.dark-mode-toggle svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
    stroke: currentColor !important;
    stroke-width: 2.5px;
    fill: none;
    display: none; /* Hidden by default, shown selectively */
    pointer-events: none;
}

/* Light Mode: Show Moon */
.dark-mode-toggle .moon-icon {
    display: block !important;
}
.dark-mode-toggle .sun-icon {
    display: none !important;
}

/* Dark Mode: Show Sun */
[data-theme="dark"] .dark-mode-toggle {
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffd700 !important; /* Solid Gold in dark mode */
}

[data-theme="dark"] .dark-mode-toggle .sun-icon {
    display: block !important;
}

[data-theme="dark"] .dark-mode-toggle .moon-icon {
    display: none !important;
}

.toggle-ball, .toggle-icons { display: none !important; }






/* ========== TOGGLE SECTION BUTTON ========== */
.toggle-section-btn {
    background: var(--primary-light);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.toggle-section-btn:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

/* ========== INPUT GROUPS ========== */
.input-group {
    margin-bottom: 28px;
}

.input-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.input-wrapper {
    position: relative;
    min-width: 0;
}

.input-wrapper label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: clamp(0.85rem, 2vw, 0.92rem);
    color: var(--text-primary);
}

.input-wrapper .optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.8rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--input-border);
    border-radius: var(--border-radius-sm);
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-family: inherit;
    transition: var(--transition);
    background: var(--input-bg);
    color: var(--text-primary);
    -webkit-appearance: none;
    appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: var(--primary);
    background: var(--hover-bg);
    box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.15);
}


/* ========== COUNT SECTION ========== */
.count-section {
    margin-bottom: 28px;
}

.quick-counts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.count-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.count-btn {
    padding: 12px 18px;
    border: 2px solid var(--input-border);
    border-radius: 50px;
    background: var(--card-bg);
    font-size: clamp(0.8rem, 2vw, 0.92rem);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.count-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.2);
}

.count-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.35);
}

.count-btn.mega {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-color: transparent;
    color: #fff;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
    }

    50% {
        box-shadow: 0 5px 25px rgba(255, 107, 53, 0.5);
    }
}

.count-btn.mega:hover {
    transform: translateY(-3px) scale(1.02);
}

[data-theme="dark"] .count-btn {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

[data-theme="dark"] .count-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.custom-count-wrapper {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.custom-count-wrapper span {
    font-weight: 500;
    color: var(--text-secondary);
}

.custom-count-wrapper input {
    width: 160px;
    max-width: 100%;
    text-align: center;
    font-weight: 600;
}

.count-warning {
    display: none;
    margin-top: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ffcc80;
    border-radius: var(--border-radius-sm);
    color: #e65100;
    font-size: clamp(0.82rem, 2vw, 0.88rem);
    text-align: center;
    font-weight: 500;
    animation: shake 0.5s ease;
}

.count-warning.show {
    display: block;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

[data-theme="dark"] .count-warning {
    background: linear-gradient(135deg, #422006 0%, #78350f 100%);
    border-color: #92400e;
    color: #fbbf24;
}

/* ========== FORMAT SECTION ========== */
.format-section {
    margin-bottom: 24px;
}

.format-toggles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.format-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    color: var(--text-primary);
    min-height: 44px;
    flex-direction: row;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.format-toggle:hover {
    border-color: var(--primary-light);
    background: rgba(233, 30, 99, 0.03);
}

.format-toggle:active {
    transform: scale(0.98);
}

.format-toggle.active {
    background: rgba(233, 30, 99, 0.05);
    border-color: var(--primary-light);
}

.format-toggle input {
    display: none;
}

.format-toggle .toggle-icon {
    font-size: clamp(1rem, 4vw, 1.25rem);
    flex-shrink: 0;
}

.format-toggle .toggle-label {
    flex: 1;
    text-align: left;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, #e91e63 0%, #f06292 100%);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 0 8px rgba(233, 30, 99, 0.1);
}

[data-theme="dark"] .format-toggle {
    background: var(--input-bg);
    color: var(--text-primary);
}

[data-theme="dark"] .format-toggle:hover {
    background: rgba(233, 30, 99, 0.08);
}

[data-theme="dark"] .format-toggle.active {
    background: rgba(233, 30, 99, 0.12);
    border-color: var(--primary);
}

[data-theme="dark"] .toggle-slider {
    background-color: #4a5568;
}

[data-theme="dark"] .toggle-slider:before {
    background-color: #e2e8f0;
}

/* ========== SUB OPTIONS ========== */
.sub-options {
    display: none;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, #fff5f8 100%);
    border-radius: var(--border-radius);
    margin-top: 12px;
    animation: slideDown 0.3s ease-out;
    border: 1px solid rgba(233, 30, 99, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-options.show {
    display: block;
}

.sub-option-group {
    margin-bottom: 16px;
}

.sub-option-group:last-child {
    margin-bottom: 0;
}

.sub-option-label {
    font-size: clamp(0.78rem, 2.5vw, 0.85rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: block;
}

[data-theme="dark"] .sub-options {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    border-color: var(--border-color);
}

/* ========== PREMIUM TOGGLE CONTAINER ========== */
.premium-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #fff 0%, #fdf2f8 100%);
    border-radius: 14px;
    border: 2px solid #fce7f3;
    transition: all 0.3s ease;
    flex-wrap: nowrap;
}

.premium-toggle-container:hover {
    border-color: #f9a8d4;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.1);
}

.toggle-label {
    font-size: clamp(0.72rem, 2.5vw, 0.88rem);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    user-select: none;
    white-space: nowrap;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.toggle-label.active {
    color: var(--primary);
    background: rgba(233, 30, 99, 0.1);
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.12);
}

.toggle-label:hover:not(.active) {
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.03);
}

.premium-toggle {
    cursor: pointer;
    padding: 2px;
    min-height: 44px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.toggle-track {
    width: 52px;
    height: 28px;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border-radius: 50px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
}

.toggle-track.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(233, 30, 99, 0.35);
}

.toggle-thumb {
    width: 22px;
    height: 22px;
    background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-thumb span {
    font-size: 11px;
    transition: all 0.3s ease;
    line-height: 1;
}

.toggle-track.active .toggle-thumb {
    left: calc(100% - 25px);
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.35), 0 4px 16px rgba(233, 30, 99, 0.15);
}

.premium-toggle:hover .toggle-thumb {
    transform: scale(1.08);
}

.premium-toggle:active .toggle-thumb {
    transform: scale(0.95);
}

[data-theme="dark"] .premium-toggle-container {
    background: linear-gradient(135deg, var(--input-bg) 0%, var(--hover-bg) 100%);
    border-color: var(--border-color);
}

[data-theme="dark"] .toggle-label {
    color: var(--text-muted);
}

[data-theme="dark"] .toggle-label.active {
    color: var(--primary);
    background: rgba(244, 114, 182, 0.12);
}

[data-theme="dark"] .toggle-track {
    background: linear-gradient(135deg, #3f3f46 0%, #52525b 100%);
}

[data-theme="dark"] .toggle-thumb {
    background: linear-gradient(145deg, #5a5a6a 0%, #4a4a5a 100%);
}

[data-theme="dark"] .toggle-track.active .toggle-thumb {
    background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
}

/* ========== PREMIUM SEGMENT CONTROL ========== */
.premium-segment-container {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #fff 0%, #fdf2f8 100%);
    border-radius: 14px;
    border: 2px solid #fce7f3;
    padding: 4px;
    position: relative;
    gap: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.premium-segment-container:hover {
    border-color: #f9a8d4;
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.1);
}

.segment-btn {
    flex: 1;
    padding: 10px 8px;
    background: transparent;
    border: none;
    font-size: clamp(0.68rem, 2.2vw, 0.82rem);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    white-space: nowrap;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.segment-btn:hover:not(.active) {
    color: var(--text-secondary);
}

.segment-btn:active {
    transform: scale(0.96);
}

.segment-btn.active {
    color: #fff;
}

.segment-slider {
    position: absolute;
    height: calc(100% - 8px);
    width: calc(33.333% - 4px);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    top: 4px;
    left: 4px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1;
    box-shadow: 0 3px 12px rgba(233, 30, 99, 0.35), 0 1px 6px rgba(233, 30, 99, 0.15);
}

.segment-slider.pos-0 {
    left: 4px;
}

.segment-slider.pos-1 {
    left: calc(33.333% + 1px);
}

.segment-slider.pos-2 {
    left: calc(66.666% - 2px);
}

[data-theme="dark"] .premium-segment-container {
    background: linear-gradient(135deg, var(--input-bg) 0%, var(--hover-bg) 100%);
    border-color: var(--border-color);
}

[data-theme="dark"] .segment-btn {
    color: var(--text-muted);
}

/* ========== EMOJI CHOOSER ========== */
.emoji-chooser {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 6px;
    padding: 12px;
    background: linear-gradient(135deg, #fff 0%, #fdf2f8 100%);
    border-radius: 14px;
    border: 2px solid #fce7f3;
    justify-items: center;
}

.emoji-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, 4vw, 1.4rem);
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.emoji-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(233, 30, 99, 0.2);
    z-index: 5;
}

.emoji-btn:active {
    transform: scale(0.95);
}

.emoji-btn.active,
.emoji-btn.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    box-shadow: 0 3px 12px rgba(233, 30, 99, 0.25), inset 0 0 0 2px var(--primary);
    transform: scale(1.05);
}

.emoji-btn.active::after,
.emoji-btn.selected::after {
    content: '✓';
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.35);
}

[data-theme="dark"] .emoji-chooser {
    background: linear-gradient(135deg, var(--input-bg) 0%, var(--hover-bg) 100%);
    border-color: var(--border-color);
}

[data-theme="dark"] .emoji-btn {
    background: var(--card-bg);
    border-color: var(--input-border);
}

/* ========== MIX EMOJI SECTION ========== */
.mix-emoji-section {
    animation: slideDown 0.3s ease-out;
}

.selected-count {
    color: var(--primary);
    font-weight: 700;
}

.mix-emoji-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.mix-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: clamp(0.72rem, 2.5vw, 0.82rem);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mix-action-btn:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
    color: var(--primary);
}

.mix-action-btn:active {
    transform: scale(0.96);
}

.mix-action-btn span {
    font-size: clamp(0.9rem, 3vw, 1rem);
}

[data-theme="dark"] .mix-action-btn {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

/* ========== SELECTED EMOJIS PREVIEW ========== */
.selected-emojis-preview {
    margin-top: 14px;
    padding: 14px;
    background: linear-gradient(135deg, #fff 0%, #fdf2f8 100%);
    border: 2px solid #fce7f3;
    border-radius: 14px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.preview-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
}

.copy-emojis-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 25px;
    font-size: clamp(0.72rem, 2.5vw, 0.82rem);
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 3px 12px rgba(233, 30, 99, 0.3);
    min-height: 40px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.copy-emojis-btn:hover {
    box-shadow: 0 5px 18px rgba(233, 30, 99, 0.4);
}

.copy-emojis-btn:active {
    transform: scale(0.96);
}

.preview-emojis {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    align-items: center;
}

.preview-emojis .emoji-item {
    font-size: clamp(1.3rem, 4vw, 1.5rem);
    padding: 6px 10px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.preview-emojis .emoji-item:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-emojis .emoji-item:active {
    transform: scale(0.95);
}

.preview-emojis .emoji-item:hover::after {
    content: '✕';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-emoji-text {
    color: var(--text-muted);
    font-size: clamp(0.78rem, 2.5vw, 0.88rem);
    font-style: italic;
}

[data-theme="dark"] .selected-emojis-preview {
    background: linear-gradient(135deg, var(--input-bg) 0%, var(--hover-bg) 100%);
    border-color: var(--border-color);
}

[data-theme="dark"] .preview-emojis .emoji-item {
    background: var(--card-bg);
    border-color: var(--input-border);
}

/* ========== RESPONSIVE - TABLET ========== */
@media (max-width: 768px) {
    .format-section {
        margin-bottom: 20px;
    }

    .format-toggles {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .format-toggle {
        padding: 12px 14px;
        gap: 10px;
    }

    .sub-options {
        padding: 14px;
        margin-top: 10px;
    }

    .premium-toggle-container {
        padding: 10px;
        gap: 6px;
    }

    .toggle-label {
        padding: 6px 8px;
        min-height: 36px;
    }

    .premium-segment-container {
        padding: 4px;
    }

    .segment-btn {
        padding: 8px 6px;
        min-height: 38px;
    }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 480px) {
    .format-section {
        margin-bottom: 16px;
    }

    .format-toggles {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        margin-bottom: 12px;
    }

    .format-toggle {
        padding: 8px 4px;
        gap: 2px;
        min-height: 52px;
        border-radius: 10px;
    }

    .format-toggle .toggle-icon {
        font-size: 1.1rem;
    }

    .sub-options {
        padding: 12px;
        margin-top: 8px;
        border-radius: 12px;
    }

    .sub-option-group {
        margin-bottom: 14px;
    }

    .sub-option-label {
        margin-bottom: 8px;
    }

    /* Toggle Container - Stacked on very small */
    .premium-toggle-container {
        padding: 10px 8px;
        gap: 6px;
        border-radius: 12px;
    }

    .toggle-label {
        padding: 6px;
        min-height: 34px;
        border-radius: 8px;
    }

    /* Toggle Track - Smaller */
    .toggle-track {
        width: 46px;
        height: 24px;
    }

    .toggle-thumb {
        width: 18px;
        height: 18px;
    }

    .toggle-thumb span {
        font-size: 10px;
    }

    .toggle-track.active .toggle-thumb {
        left: calc(100% - 21px);
    }

    /* Segment Control - Compact */
    .premium-segment-container {
        border-radius: 12px;
    }

    .segment-btn {
        padding: 8px 4px;
        min-height: 36px;
        border-radius: 8px;
    }

    .segment-slider {
        border-radius: 8px;
    }

    /* Emoji Grid - Optimized */
    .emoji-chooser {
        grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
        gap: 5px;
        padding: 10px;
        border-radius: 12px;
    }

    .emoji-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
        border-radius: 10px;
    }

    .emoji-btn.active::after,
    .emoji-btn.selected::after {
        width: 14px;
        height: 14px;
        font-size: 8px;
        bottom: -2px;
        right: -2px;
    }

    /* Mix Actions - 2 Column Grid */
    .mix-emoji-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        margin-top: 12px;
    }

    .mix-action-btn {
        padding: 8px 10px;
        gap: 4px;
        min-height: 40px;
        border-radius: 20px;
    }

    /* Preview Section */
    .selected-emojis-preview {
        padding: 12px;
        margin-top: 12px;
        border-radius: 12px;
    }

    .preview-header {
        margin-bottom: 10px;
    }

    .copy-emojis-btn {
        padding: 6px 12px;
        min-height: 36px;
    }

    .preview-emojis {
        gap: 6px;
        min-height: 36px;
    }

    .preview-emojis .emoji-item {
        padding: 5px 8px;
        border-radius: 8px;
    }
}

/* ========== RESPONSIVE - VERY SMALL MOBILE ========== */
@media (max-width: 360px) {
    .format-toggles {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .format-toggle {
        padding: 10px 6px;
        min-height: 56px;
    }

    .premium-toggle-container {
        flex-wrap: wrap;
        gap: 8px;
    }

    .toggle-label {
        flex: 0 0 auto;
        min-width: 70px;
    }

    .toggle-track {
        width: 44px;
        height: 22px;
    }

    .toggle-thumb {
        width: 16px;
        height: 16px;
    }

    .toggle-track.active .toggle-thumb {
        left: calc(100% - 19px);
    }

    .segment-btn {
        padding: 6px 3px;
        font-size: 0.65rem;
    }

    .emoji-chooser {
        grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
        gap: 4px;
        padding: 8px;
    }

    .emoji-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        font-size: 1.1rem;
    }

    .mix-emoji-actions {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }

    .mix-action-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
    }

    .mix-action-btn span {
        font-size: 0.85rem;
    }
}

/* ========== TOUCH DEVICE OPTIMIZATIONS ========== */
@media (hover: none) and (pointer: coarse) {
    .format-toggle:hover {
        transform: none;
    }

    .format-toggle:active {
        transform: scale(0.96);
        background: var(--primary-lighter);
    }

    .emoji-btn:hover {
        transform: none;
    }

    .emoji-btn:active {
        transform: scale(0.92);
    }

    .premium-toggle:hover .toggle-thumb {
        transform: none;
    }

    .premium-toggle:active .toggle-thumb {
        transform: scale(1.1);
    }

    .segment-btn:hover:not(.active) {
        color: var(--text-muted);
    }

    .mix-action-btn:hover {
        transform: none;
        border-color: #e5e7eb;
        background: #fff;
        color: var(--text-primary);
    }

    .mix-action-btn:active {
        border-color: var(--primary);
        background: var(--primary-lighter);
        color: var(--primary);
    }

    .copy-emojis-btn:hover {
        transform: none;
    }

    .copy-emojis-btn:active {
        transform: scale(0.96);
    }

    .preview-emojis .emoji-item:hover {
        transform: none;
    }

    .preview-emojis .emoji-item:active {
        transform: scale(0.9);
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .format-section {
        margin-bottom: 12px;
    }

    .format-toggles {
        gap: 4px;
        margin-bottom: 10px;
    }

    .format-toggle {
        padding: 8px 6px;
        min-height: 40px;
    }

    .sub-options {
        padding: 10px;
    }

    .sub-option-group {
        margin-bottom: 10px;
    }

    .premium-toggle-container {
        padding: 8px;
    }

    .emoji-chooser {
        padding: 8px;
        gap: 4px;
        max-height: 120px;
        overflow-y: auto;
    }

    .emoji-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {

    .format-toggle,
    .toggle-track,
    .toggle-thumb,
    .segment-slider,
    .emoji-btn,
    .mix-action-btn,
    .copy-emojis-btn,
    .preview-emojis .emoji-item {
        transition: none;
    }

    .sub-options {
        animation: none;
    }

    .mix-emoji-section {
        animation: none;
    }

    @keyframes slideDown {

        from,
        to {
            opacity: 1;
            transform: none;
        }
    }
}

/* ========== PREVIEW SECTION ========== */
.preview-section {
    margin-bottom: 28px;
}

.preview-label {
    font-size: clamp(0.75rem, 2vw, 0.82rem);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-label::before {
    content: '👁️';
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.preview-box {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 20px;
    min-height: 90px;
    font-size: clamp(0.9rem, 2vw, 0.98rem);
    color: var(--text-secondary);
    transition: var(--transition);
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.preview-box.has-content {
    background: linear-gradient(135deg, #fff9fb 0%, #fff0f5 100%);
    border-color: var(--primary);
    border-style: solid;
    color: var(--text-primary);
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.1);
}

[data-theme="dark"] .preview-box {
    background: linear-gradient(135deg, var(--input-bg) 0%, var(--hover-bg) 100%);
    border-color: var(--input-border);
    color: var(--text-secondary);
}

[data-theme="dark"] .preview-box.has-content {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
    color: var(--text-primary);
}

/* ========== FORMAT TOGGLES ========== */
.format-item {
    margin-bottom: 12px;
}

.format-item:last-child {
    margin-bottom: 0;
}

.format-toggles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

/* ========== ACTION BUTTONS ========== */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 28px;
}

.btn {
    padding: 16px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: clamp(0.95rem, 2vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    min-height: 48px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: width 0.6s ease, height 0.6s ease;
    transform: translate(-50%, -50%);
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    background-size: 200% auto;
    color: #fff;
    box-shadow: 0 5px 25px rgba(233, 30, 99, 0.4);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    padding: 18px 28px;
    min-height: 52px;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 35px rgba(233, 30, 99, 0.5);
}

.btn-primary:active {
    transform: translateY(-2px) scale(0.98);
}

.secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.btn-success {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 22px rgba(67, 160, 71, 0.45);
    transform: translateY(-3px);
}

.btn-info {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.btn-info:hover {
    box-shadow: 0 6px 22px rgba(25, 118, 210, 0.45);
    transform: translateY(-3px);
}

.btn-reset {
    background: transparent;
    color: var(--danger);
    border: 2px solid var(--danger);
    grid-column: 1 / -1;
}

.btn-reset:hover {
    background: var(--danger);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

/* ========== WHATSAPP SECTION ========== */
.whatsapp-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 2px solid var(--border-color);
}

.badge-new {
    font-size: 0.65rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--success) 0%, #2e7d32 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 10px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    }

    50% {
        box-shadow: 0 2px 15px rgba(76, 175, 80, 0.5);
    }
}

.whatsapp-info {
    margin-bottom: 20px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--info);
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-card p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.whatsapp-controls {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.chunk-settings {
    flex: 1;
    min-width: 200px;
}

.chunk-settings label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    min-height: 48px;
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-chunks {
    animation: slideDown 0.4s ease;
}

.chunks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.chunks-header h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.chunks-count {
    background: var(--primary-light);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.chunks-container {
    display: grid;
    gap: 12px;
}

.chunk-card {
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: var(--border-radius);
    padding: 15px;
    transition: var(--transition);
}

.chunk-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.1);
}

.chunk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.chunk-title {
    font-weight: 600;
    color: var(--primary);
}

.chunk-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.chunk-preview {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
    max-height: 60px;
    overflow: hidden;
}

.chunk-actions {
    display: flex;
    gap: 8px;
}

.chunk-copy-btn,
.chunk-whatsapp-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    min-height: 44px;
}

.chunk-copy-btn {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.chunk-copy-btn:hover {
    background: var(--primary);
    color: white;
}

.chunk-whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
}

.chunk-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

[data-theme="dark"] .info-card {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
}

[data-theme="dark"] .chunk-card {
    background: var(--input-bg);
    border-color: var(--input-border);
}

/* ========== SHARE SECTION ========== */
.share-section {
    margin-bottom: 28px;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-size: clamp(0.75rem, 2vw, 0.82rem);
    font-weight: 600;
    color: #fff;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    min-height: 80px;
    justify-content: center;
}

.share-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.share-btn .share-icon {
    font-size: 1.5rem;
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.share-btn.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d47a1 100%);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
}

.share-btn.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

/* ========== OUTPUT SECTION ========== */
.output-section {
    margin-bottom: 18px;
}

.output-textarea {
    width: 100%;
    min-height: 140px;
    /* reduced from 220 */
    max-height: 320px;
    /* reduced height */
    padding: 16px;
    background: linear-gradient(135deg, #fff9fb 0%, #fff0f5 100%);
    border: 1.5px solid var(--primary-light);
    border-radius: var(--border-radius);
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    line-height: 1.6;
    /* reduced vertical space */
    resize: vertical;
    font-family: inherit;
    overflow-y: auto;
    color: var(--text-primary);
    transition: var(--transition);
    word-wrap: break-word;
}

.output-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 6px rgba(233, 30, 99, 0.2);
}

.output-textarea::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] .output-textarea {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    border-color: var(--border-color);
}

/* Stats Box */
.stats-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
    padding: 14px;
    background: #fff7fa;
    border-radius: var(--border-radius);
    border: 1px solid rgba(233, 30, 99, 0.08);
}

.stat-item {
    text-align: center;
    padding: 6px;
}

.stat-value {
    font-size: clamp(1.1rem, 2.8vw, 1.3rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

.stat-label {
    font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    color: var(--text-muted);
    margin-top: 3px;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .output-textarea {
        min-height: 120px;
        /* Even smaller on small screens */
        max-height: 260px;
        padding: 14px;
    }

    .stats-box {
        grid-template-columns: repeat(3, 1fr);
        padding: 10px;
        gap: 6px;
    }

    .stat-item {
        padding: 4px;
    }
}

[data-theme="dark"] .stats-box {
    background: var(--primary-lighter);
}

/* ========== PREMIUM STYLES SECTION ========== */
.premium-styles-section {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    margin-bottom: 35px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(233, 30, 99, 0.08);
}

.premium-styles-header {
    padding: 22px 25px;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, #fff5f8 50%, #ffe4ec 100%);
    border-bottom: 1px solid rgba(233, 30, 99, 0.1);
}

.premium-styles-header h3 {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.premium-badge {
    font-size: clamp(0.6rem, 2vw, 0.65rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.premium-styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    padding: 22px;
}

.style-card {
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: var(--border-radius);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.style-card:hover {
    border-color: var(--primary);
    background: var(--hover-bg);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.15);
}

.style-preview {
    background: var(--card-bg);
    padding: 14px 10px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    word-break: break-word;
}

.style-text {
    font-size: clamp(0.82rem, 2vw, 0.95rem);
    color: var(--text-primary);
    line-height: 1.4;
}

.style-emoji {
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.style-name {
    font-size: clamp(0.75rem, 2vw, 0.82rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.style-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.style-use-btn,
.style-copy-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 10px;
    border-radius: 50px;
    font-size: clamp(0.72rem, 2vw, 0.78rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-height: 38px;
}

.style-use-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    box-shadow: 0 3px 12px rgba(233, 30, 99, 0.3);
}

.style-use-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(233, 30, 99, 0.4);
}

.style-copy-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.style-copy-btn:hover {
    background: var(--primary);
    color: #fff;
}

.generate-all-styles {
    padding: 22px;
    text-align: center;
    border-top: 1px solid rgba(233, 30, 99, 0.1);
    background: linear-gradient(135deg, #fff 0%, var(--primary-lighter) 100%);
}

.btn-generate-all {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 50px;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 25px rgba(233, 30, 99, 0.4);
    min-height: 48px;
}

.btn-generate-all:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 35px rgba(233, 30, 99, 0.5);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-generate-all:hover .btn-arrow {
    transform: translateX(5px);
}

.generate-hint {
    font-size: clamp(0.78rem, 2vw, 0.85rem);
    color: var(--text-muted);
    margin-top: 12px;
}

[data-theme="dark"] .premium-styles-section {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .premium-styles-header {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
}

[data-theme="dark"] .style-card {
    background: var(--input-bg);
    border-color: var(--input-border);
}

[data-theme="dark"] .style-preview {
    background: var(--card-bg);
}

[data-theme="dark"] .generate-all-styles {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--primary-lighter) 100%);
}

/* ========== SAMPLE TEXTS SECTION ========== */
.sample-texts-section {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    margin-bottom: 35px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(233, 30, 99, 0.08);
}

.sample-texts-header {
    padding: 22px 25px;
    background: linear-gradient(135deg, #ffe4ec 0%, #ffd6e7 50%, var(--primary-lighter) 100%);
    border-bottom: 1px solid rgba(233, 30, 99, 0.1);
}

.sample-texts-header h3 {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sample-tabs {
    display: flex;
    gap: 8px;
    padding: 18px 20px;
    overflow-x: auto;
    background: var(--input-bg);
    border-bottom: 1px solid rgba(233, 30, 99, 0.08);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.sample-tabs::-webkit-scrollbar {
    height: 4px;
}

.sample-tabs::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

.sample-tab {
    flex-shrink: 0;
    padding: 11px 18px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: clamp(0.8rem, 2vw, 0.88rem);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-height: 44px;
}

.sample-tab:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.sample-tab.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.35);
}

.sample-messages-container {
    padding: 22px;
}

.sample-category {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.sample-category.active {
    display: grid;
    animation: fadeIn 0.4s ease;
}

.sample-card {
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: var(--border-radius);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.sample-card:hover {
    border-color: var(--primary);
    background: var(--hover-bg);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.12);
}

.sample-text {
    font-size: clamp(0.92rem, 2vw, 1rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.sample-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.popularity {
    font-size: clamp(0.72rem, 2vw, 0.78rem);
    font-weight: 600;
    color: var(--text-muted);
    background: var(--card-bg);
    padding: 5px 12px;
    border-radius: 50px;
}

.use-btn {
    font-size: clamp(0.78rem, 2vw, 0.85rem);
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.sample-card:hover .use-btn {
    transform: translateX(5px);
}

.sample-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px;
    margin: 0 22px 22px;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, #fff5f8 100%);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary);
}

.tip-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.tip-text {
    font-size: clamp(0.85rem, 2vw, 0.92rem);
    color: var(--text-secondary);
    line-height: 1.6;
}

[data-theme="dark"] .sample-texts-section {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .sample-texts-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-lighter) 100%);
}

[data-theme="dark"] .sample-tabs {
    background: var(--input-bg);
}

[data-theme="dark"] .sample-card {
    background: var(--input-bg);
    border-color: var(--input-border);
}

[data-theme="dark"] .sample-card:hover {
    background: var(--hover-bg);
}

[data-theme="dark"] .popularity {
    background: var(--card-bg);
}

[data-theme="dark"] .sample-tip {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
}

/* ========== TOAST NOTIFICATION ========== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, var(--success) 0%, #2e7d32 100%);
    color: #fff;
    padding: 18px 35px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
    z-index: 99999;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
    max-width: 90vw;
    word-break: break-word;
}

.toast.show {
    transform: translate(-50%, -50%) scale(1);
}

/* ========== ACHIEVEMENT TOAST ========== */
.achievement-toast {
    position: fixed;
    top: 100px;
    right: -400px;
    background: linear-gradient(135deg, var(--gold) 0%, #ffed4e 100%);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
    z-index: 10000;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.achievement-toast.show {
    right: 20px;
}

.achievement-toast-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.achievement-toast-icon {
    font-size: 2rem;
    animation: bounce 0.6s ease;
}

.achievement-toast-text {
    display: flex;
    flex-direction: column;
}

.achievement-toast-title {
    font-weight: 700;
    color: #333;
}

.achievement-toast-desc {
    font-size: 0.9rem;
    color: #555;
}

/* ========== MODAL ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    animation: modalIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    font-size: clamp(3rem, 8vw, 3.5rem);
    margin-bottom: 18px;
}

.modal h3 {
    font-size: clamp(1.2rem, 3vw, 1.35rem);
    margin-bottom: 14px;
    color: var(--warning);
}

.modal p {
    color: var(--text-secondary);
    margin-bottom: 26px;
    line-height: 1.6;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 13px 26px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: clamp(0.9rem, 2vw, 1rem);
    font-family: inherit;
    min-height: 46px;
}

.modal-btn-cancel {
    background: var(--input-bg);
    color: var(--text-primary);
}

.modal-btn-cancel:hover {
    background: var(--hover-bg);
}

.modal-btn-confirm {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.35);
}

.modal-btn-confirm:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 22px rgba(233, 30, 99, 0.45);
}

/* Level Up Modal */
.level-up-modal {
    text-align: center;
}

.level-up-animation {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: levelUpBounce 0.8s ease;
}

@keyframes levelUpBounce {
    0% {
        transform: scale(0) rotate(-180deg);
    }

    50% {
        transform: scale(1.2) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

.level-up-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    font-size: 1.1rem;
    flex-wrap: wrap;
}

.old-level {
    color: var(--text-secondary);
}

.arrow {
    color: var(--primary);
    font-size: 1.5rem;
}

.new-level {
    font-weight: 700;
    color: var(--primary);
}

[data-theme="dark"] .modal {
    background: var(--card-bg);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .modal-btn-cancel {
    background: var(--input-bg);
    color: var(--text-primary);
}

/* ========== COPY BUTTON STYLES ========== */
.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.2);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.copy-btn:active {
    transform: translateY(0);
}

/* For items that need relative positioning for absolute copy buttons */
.copyable-item {
    position: relative;
}

/* Icon-only copy button variant */
.copy-icon-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-icon-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

[data-theme="dark"] .copy-icon-btn {
    border-color: var(--border-color);
}

[data-theme="dark"] .copy-icon-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ========== MASTER FOOTER ========== */
.footer {
    background: var(--card-bg);
    padding: 60px 0 30px;
    border-top: 2px solid var(--border-color);
    margin-top: 80px;
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column h3 {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 15px;
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-column ul li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 30px 25px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

[data-theme="dark"] .footer {
    border-top-color: var(--border-color);
}

@media (max-width: 768px) {
    .footer {
        padding: 40px 0 30px;
        margin-top: 50px;
    }

    .footer-container {
        gap: 30px;
        text-align: center;
    }

    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-column ul li a {
        justify-content: center;
    }
}

/* ========== HIDDEN ELEMENTS ========== */
.hidden {
    position: absolute !important;
    left: -9999px !important;
    visibility: hidden !important;
}

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-lighter);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light) 0%, #f8bbd9 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--input-bg);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--border-color) 0%, var(--primary-light) 100%);
}

/* ========== SELECTION ========== */
::selection {
    background: var(--primary);
    color: #fff;
}

/* ========== FOCUS VISIBLE STYLES ========== */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px 50px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.active {
        max-height: 400px;
        border-top: 1px solid var(--border-color);
    }

    .nav-links a {
        padding: 15px 20px;
        border-radius: 0;
    }

    .hamburger {
        display: flex;
    }

    .gamification-bar {
        flex-direction: column;
        gap: 15px;
    }

    .user-level {
        width: 100%;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .generator-card {
        padding: 22px 18px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }




    .input-row {
        grid-template-columns: 1fr;
    }

    .format-toggles {
        grid-template-columns: repeat(3, 1fr);
    }

    .premium-segment-container {
        flex-direction: column;
        padding: 8px;
    }

    .segment-btn {
        width: 100%;
    }

    .segment-slider {
        width: calc(100% - 16px) !important;
        height: calc(33.333% - 10px);
        left: 8px !important;
    }

    .segment-slider.pos-0 {
        top: 8px;
    }

    .segment-slider.pos-1 {
        top: calc(33.333% + 3px);
    }

    .segment-slider.pos-2 {
        top: calc(66.666% - 2px);
    }

    .secondary-actions {
        grid-template-columns: 1fr;
    }

    .whatsapp-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .chunk-actions {
        flex-direction: column;
    }

    .share-grid {
        grid-template-columns: repeat(2, 1fr);
    }



    .premium-styles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .style-actions {
        flex-direction: column;
    }

    .sample-category {
        grid-template-columns: 1fr;
    }

    .sample-tip {
        margin: 0 15px 18px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .modal {
        padding: 24px 18px;
        margin: 15px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }

    .achievement-toast.show {
        right: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px 12px 40px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .format-toggles {
        grid-template-columns: repeat(2, 1fr);
    }

    .emoji-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 1.2rem;
    }

    .premium-styles-grid {
        grid-template-columns: 1fr;
    }

    .toast {
        padding: 15px 25px;
        max-width: 85vw;
    }
}

@media (max-width: 360px) {
    .logo-text {
        font-size: 1.1rem;
    }

    .count-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .format-toggle {
        padding: 6px 4px;
        font-size: 0.7rem;
    }

    .emoji-btn {
        width: 35px;
        height: 35px;
        min-width: 35px;
        min-height: 35px;
        font-size: 1rem;
    }
}

/* ========== LANDSCAPE MODE ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: 8px 0;
    }

    .hero {
        padding: 10px 0;
        margin-bottom: 15px;
    }

    .modal {
        max-height: 95vh;
        overflow-y: auto;
    }
}

/* ========== TABLET LANDSCAPE ========== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 720px;
    }

    .premium-styles-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sample-category {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== LARGE SCREENS ========== */
@media (min-width: 1200px) {
    .container {
        max-width: 850px;
    }

    .generator-card {
        padding: 40px;
    }

    .premium-styles-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .sample-category {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .heart,
    .floating-hearts {
        display: none;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    :root {
        --primary: #d81b60;
        --text-primary: #000000;
        --text-secondary: #333333;
        --card-bg: #ffffff;
        --input-border: #666666;
    }

    [data-theme="dark"] {
        --primary: #ff80ab;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --card-bg: #000000;
        --input-border: #888888;
    }
}

/* ========== PRINT STYLES ========== */
@media print {

    .floating-hearts,
    .navbar,
    .gamification-bar,
    .achievements-panel,
    .dark-mode-toggle,
    .action-buttons,
    .share-section,
    .whatsapp-section,
    .premium-styles-section,
    .sample-texts-section,
    .footer,
    .toast,
    .achievement-toast,
    .modal-overlay {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .generator-card {
        box-shadow: none;
        border: 1px solid #ddd;
        padding: 20px;
    }
}

/* ========== UTILITY CLASSES ========== */
.w-100 {
    width: 100%;
}

.text-center {
    text-align: center;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* ========== ACCESSIBILITY ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== LOADING STATES ========== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== THEME TRANSITIONS ========== */
body,
.navbar,
.generator-card,
.footer,
input,
select,
textarea,
button,
.format-toggle,
.count-btn,
.emoji-btn,
.sample-card,
.style-card,
.premium-styles-section,
.sample-texts-section,
.sub-options,
.premium-toggle-container,
.premium-segment-container,
.preview-box,
.output-textarea,
.stats-box,
.modal,
.gamification-bar,
.achievements-panel,
.anniversary-section,
.whatsapp-section {
    transition: background-color 0.4s ease,
        border-color 0.4s ease,
        color 0.3s ease,
        box-shadow 0.3s ease;
}


/* ========== INDIVIDUAL BUTTON COLORS ========== */

/* Facebook */
.share-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5bbd 100%);
}

.share-facebook:hover {
    background: linear-gradient(135deg, #0d5bbd 0%, #094a9e 100%);
}

/* Twitter/X */
.share-twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
}

.share-twitter:hover {
    background: linear-gradient(135deg, #0c85d0 0%, #0a6eb0 100%);
}

/* WhatsApp */
.share-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.share-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e 0%, #0e7a6d 100%);
}

/* Telegram */
.share-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

.share-telegram:hover {
    background: linear-gradient(135deg, #006699 0%, #005580 100%);
}

/* LinkedIn */
.share-linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
}

.share-linkedin:hover {
    background: linear-gradient(135deg, #005885 0%, #004670 100%);
}

/* Pinterest */
.share-pinterest {
    background: linear-gradient(135deg, #e60023 0%, #ad001a 100%);
}

.share-pinterest:hover {
    background: linear-gradient(135deg, #ad001a 0%, #8a0015 100%);
}

/* Reddit */
.share-reddit {
    background: linear-gradient(135deg, #ff4500 0%, #cc3700 100%);
}

.share-reddit:hover {
    background: linear-gradient(135deg, #cc3700 0%, #a82d00 100%);
}

/* Email */
.share-email {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.share-email:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

/* Copy Link */
.share-copy {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.share-copy:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

/* ========== FIRST & LAST BUTTON RADIUS ========== */
#floating-share-buttons li:first-child a {
    border-radius: 0 8px 0 0;
}

#floating-share-buttons li:last-child a {
    border-radius: 0 0 8px 0;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    #floating-share-buttons {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        transform: none;
        flex-direction: row;
        justify-content: center;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        padding: 8px 0;
        gap: 0;
    }

    #floating-share-buttons li a {
        width: 44px;
        height: 44px;
        border-radius: 50% !important;
        margin: 0 4px;
    }

    #floating-share-buttons li a svg {
        width: 20px;
        height: 20px;
    }

    #floating-share-buttons li a:hover {
        width: 44px;
        transform: translateY(-5px);
    }

    /* Hide Tooltip on Mobile */
    #floating-share-buttons li a::after,
    #floating-share-buttons li a::before {
        display: none;
    }

    #floating-share-buttons li:first-child a,
    #floating-share-buttons li:last-child a {
        border-radius: 50% !important;
    }
}

@media (max-width: 480px) {
    #floating-share-buttons li a {
        width: 40px;
        height: 40px;
        margin: 0 3px;
    }

    #floating-share-buttons li a svg {
        width: 18px;
        height: 18px;
    }
}

/* ========== ANIMATION ========== */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%) translateY(-50%);
        opacity: 0;
    }

    to {
        transform: translateX(0) translateY(-50%);
        opacity: 1;
    }
}

#floating-share-buttons {
    animation: slideInLeft 0.5s ease-out;
}

@media (max-width: 768px) {
    @keyframes slideInUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    #floating-share-buttons {
        animation: slideInUp 0.5s ease-out;
    }
}

/* ========== HOVER RIPPLE EFFECT ========== */
#floating-share-buttons li a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

#floating-share-buttons li a:active::before {
    width: 120px;
    height: 120px;
}

/* ========== SHARE SECTION ========== */
.share-section {
    margin-bottom: 28px;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

/* Changed from .share-btn to .share-card */
.share-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 12px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    min-height: 90px;
    position: relative;
    overflow: hidden;
}

/* Shine Effect */
.share-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent);
    transition: left 0.5s ease;
}

.share-card:hover::before {
    left: 100%;
}

.share-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.share-card:active {
    transform: translateY(-2px) scale(0.98);
}

/* Icon Container */
.share-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 8px;
    transition: all 0.3s ease;
}

.share-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.share-card:hover .share-icon {
    transform: scale(1.15) rotate(5deg);
    background: rgba(255, 255, 255, 0.3);
}

/* Label */
.share-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ========== INDIVIDUAL CARD COLORS ========== */

/* WhatsApp */
.share-card.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
}

.share-card.whatsapp:hover {
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45);
}

/* Facebook */
.share-card.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5bbd 100%);
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.35);
}

.share-card.facebook:hover {
    box-shadow: 0 12px 30px rgba(24, 119, 242, 0.45);
}

/* Twitter/X */
.share-card.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.35);
}

.share-card.twitter:hover {
    box-shadow: 0 12px 30px rgba(29, 161, 242, 0.45);
}

/* Telegram */
.share-card.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.35);
}

.share-card.telegram:hover {
    box-shadow: 0 12px 30px rgba(0, 136, 204, 0.45);
}

/* ========== DARK MODE ========== */
[data-theme="dark"] .share-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .share-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .share-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .share-card {
        padding: 14px 8px;
        min-height: 80px;
    }

    .share-icon {
        width: 30px;
        height: 30px;
        padding: 6px;
    }

    .share-label {
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .share-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .share-card {
        padding: 12px 6px;
        min-height: 75px;
        gap: 8px;
    }

    .share-icon {
        width: 28px;
        height: 28px;
    }

    .share-label {
        font-size: 0.72rem;
    }
}

/* ========== ICON ANIMATION ========== */
@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.share-card:hover .share-icon svg {
    animation: iconPulse 0.6s ease;
}

/* ========== FLOATING SHARE BUTTONS ========== */
#floating-share-buttons {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0;
}

#floating-share-buttons li {
    margin: 0;
    padding: 0;
}

#floating-share-buttons li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#floating-share-buttons li a svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

/* Hover Effects */
#floating-share-buttons li a:hover {
    width: 65px;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
}

#floating-share-buttons li a:hover svg {
    transform: scale(1.15);
}

/* Tooltip on Hover */
#floating-share-buttons li a::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    margin-left: 10px;
}

#floating-share-buttons li a::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-left: -2px;
}

#floating-share-buttons li a:hover::after,
#floating-share-buttons li a:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ========== INDIVIDUAL BUTTON COLORS ========== */

/* Facebook */
.share-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5bbd 100%);
}

.share-facebook:hover {
    background: linear-gradient(135deg, #0d5bbd 0%, #094a9e 100%);
}

/* Twitter/X */
.share-twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0c85d0 100%);
}

.share-twitter:hover {
    background: linear-gradient(135deg, #0c85d0 0%, #0a6eb0 100%);
}

/* WhatsApp */
.share-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.share-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e 0%, #0e7a6d 100%);
}

/* Telegram */
.share-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

.share-telegram:hover {
    background: linear-gradient(135deg, #006699 0%, #005580 100%);
}

/* LinkedIn */
.share-linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
}

.share-linkedin:hover {
    background: linear-gradient(135deg, #005885 0%, #004670 100%);
}

/* Pinterest */
.share-pinterest {
    background: linear-gradient(135deg, #e60023 0%, #ad001a 100%);
}

.share-pinterest:hover {
    background: linear-gradient(135deg, #ad001a 0%, #8a0015 100%);
}

/* Reddit */
.share-reddit {
    background: linear-gradient(135deg, #ff4500 0%, #cc3700 100%);
}

.share-reddit:hover {
    background: linear-gradient(135deg, #cc3700 0%, #a82d00 100%);
}

/* Email */
.share-email {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.share-email:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

/* Copy Link */
.share-copy {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.share-copy:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

/* ========== FIRST & LAST BUTTON RADIUS ========== */
#floating-share-buttons li:first-child a {
    border-radius: 0 8px 0 0;
}

#floating-share-buttons li:last-child a {
    border-radius: 0 0 8px 0;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    #floating-share-buttons {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        transform: none;
        flex-direction: row;
        justify-content: center;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        padding: 8px 0;
        gap: 0;
    }

    #floating-share-buttons li a {
        width: 44px;
        height: 44px;
        border-radius: 50% !important;
        margin: 0 4px;
    }

    #floating-share-buttons li a svg {
        width: 20px;
        height: 20px;
    }

    #floating-share-buttons li a:hover {
        width: 44px;
        transform: translateY(-5px);
    }

    /* Hide Tooltip on Mobile */
    #floating-share-buttons li a::after,
    #floating-share-buttons li a::before {
        display: none;
    }

    #floating-share-buttons li:first-child a,
    #floating-share-buttons li:last-child a {
        border-radius: 50% !important;
    }
}

@media (max-width: 480px) {
    #floating-share-buttons li a {
        width: 40px;
        height: 40px;
        margin: 0 3px;
    }

    #floating-share-buttons li a svg {
        width: 18px;
        height: 18px;
    }
}

/* ========== ANIMATION ========== */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%) translateY(-50%);
        opacity: 0;
    }

    to {
        transform: translateX(0) translateY(-50%);
        opacity: 1;
    }
}

#floating-share-buttons {
    animation: slideInLeft 0.5s ease-out;
}

@media (max-width: 768px) {
    @keyframes slideInUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    #floating-share-buttons {
        animation: slideInUp 0.5s ease-out;
    }
}

/* ========== HOVER RIPPLE EFFECT ========== */
#floating-share-buttons li a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

#floating-share-buttons li a:active::before {
    width: 120px;
    height: 120px;
}

/* ========== SECTION PREVIEW (Before Click) ========== */
.section-preview {
    margin-top: 15px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, #fff0f5 100%);
    border-radius: var(--border-radius);
    border: 2px dashed var(--primary-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.section-preview:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.15);
}

.preview-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.preview-icon {
    font-size: 2.5rem;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.preview-text {
    flex: 1;
    min-width: 200px;
}

.preview-main {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 6px 0;
}

.preview-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.preview-arrow {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(233, 30, 99, 0.1);
    padding: 8px 14px;
    border-radius: 50px;
    white-space: nowrap;
    animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* ========== DARK MODE ========== */
[data-theme="dark"] .section-preview {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    border-color: var(--border-color);
}

[data-theme="dark"] .section-preview:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light) 0%, #4a1942 100%);
}

[data-theme="dark"] .preview-main {
    color: var(--primary);
}

[data-theme="dark"] .preview-sub {
    color: var(--text-secondary);
}

[data-theme="dark"] .preview-arrow {
    background: rgba(244, 114, 182, 0.2);
    color: var(--primary);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
    .preview-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .preview-icon {
        font-size: 2rem;
    }

    .preview-text {
        min-width: 100%;
    }

    .preview-main {
        font-size: 0.95rem;
    }

    .preview-sub {
        font-size: 0.8rem;
    }
}



/* ========== SEO CONTENT SECTION ========== */
.seo-content-section {
    margin-top: 40px;
}

.seo-block {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(233, 30, 99, 0.08);
}

.seo-block h2 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.3;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.seo-block h3 {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 25px 0 15px 0;
}

.seo-block h4 {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
    color: var(--primary-dark);
    margin: 20px 0 10px 0;
}

.seo-block p {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.seo-block strong {
    color: var(--text-primary);
    font-weight: 600;
}

.seo-block em {
    font-style: italic;
    color: var(--primary);
}

/* SEO Lists */
.seo-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.seo-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    font-size: clamp(0.92rem, 2vw, 1rem);
    line-height: 1.7;
    color: var(--text-secondary);
}

.seo-list li::before {
    content: '💕';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.9rem;
}

.seo-list li strong {
    color: var(--text-primary);
}

/* FAQ Section */
.faq-section .faq-item {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, #fff5f8 100%);
    border-radius: var(--border-radius);
    padding: 20px 25px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
}

.faq-section .faq-item h3 {
    font-size: 1.05rem;
    margin: 0 0 10px 0;
    color: var(--primary-dark);
}

.faq-section .faq-item p {
    margin: 0;
    font-size: 0.95rem;
}

/* Dark Mode */
[data-theme="dark"] .seo-block {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .seo-block h2 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .seo-block h4 {
    color: var(--primary);
}

[data-theme="dark"] .faq-section .faq-item {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .seo-block {
        padding: 25px 20px;
    }

    .faq-section .faq-item {
        padding: 15px 18px;
    }
}

@media (max-width: 480px) {
    .seo-block {
        padding: 20px 15px;
        border-radius: var(--border-radius);
    }

    .seo-list li {
        padding-left: 25px;
    }
}

.share-icon {
    font-size: 22px;
    margin-right: 8px;
}

.section-title-group .icon {
    margin-right: 10px;
    font-size: 22px;
}

/* ========== REALTIME ONLINE USERS ========== */
.realtime-online {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.online-count {
    font-size: 1.3rem;
    font-weight: 800;
    min-width: 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.online-count.updating {
    animation: countPulse 0.3s ease;
}

@keyframes countPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.online-text {
    font-weight: 500;
}

/* Stats Update Animation */
#totalPlayers.updating,
#totalCountries.updating {
    animation: countPulse 0.3s ease;
    color: #22c55e;
}

/* Note: Main toast styles are defined earlier at line ~3182 */

/* ========== COPY BUTTON STYLES ========== */
.copy-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

.message-card {
    position: relative;
}

[data-theme="dark"] .copy-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 12px rgba(244, 114, 182, 0.3);
}

[data-theme="dark"] .copy-btn:hover {
    box-shadow: 0 6px 20px rgba(244, 114, 182, 0.5);
}

/* Mobile Copy Button */
@media (max-width: 768px) {
    .copy-btn {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 10px;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* ========== COMPREHENSIVE MOBILE OPTIMIZATION ========== */

/* Mobile Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    h3 {
        font-size: 1.1rem !important;
    }

    body,
    p {
        font-size: 0.95rem !important;
    }

    /* Container & Section Spacing */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    section {
        margin-top: 30px !important;
        margin-bottom: 30px !important;
    }

    /* Card Padding */
    .card,
    .message-card,
    .about-section-container {
        padding: 16px !important;
    }

    /* Button Optimization */
    .action-btn {
        padding: 5px 12px !important;
        font-size: 0.75rem !important;
        border-radius: 12px !important;
    }

    .copy-all-btn {
        padding: 7px 18px !important;
        font-size: 0.8rem !important;
    }

    button,
    .btn {
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
    }

    /* Format Options - Extra Compact */
    .format-toggle {
        padding: 4px 10px !important;
        min-height: 28px !important;
        font-size: 0.85rem !important;
    }

    .format-item {
        margin-bottom: 4px !important;
    }

    .toggle-icon {
        font-size: 1rem !important;
        width: 20px !important;
        height: 20px !important;
    }

    .toggle-switch {
        width: 36px !important;
        height: 18px !important;
    }

    /* Message Grid - Single Column */
    .messages-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* About Section */
    .about-section-container {
        border-radius: 16px !important;
    }

    .about-section-content {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }

    /* Header & Navigation */
    header {
        padding: 12px 16px !important;
    }

    .logo {
        font-size: 1.2rem !important;
    }

    /* Footer */
    footer {
        padding: 24px 16px !important;
    }

    .footer-column {
        margin-bottom: 20px !important;
    }

    /* Tool Component */
    .output-textarea {
        min-height: 200px !important;
        font-size: 0.9rem !important;
    }

    input,
    textarea,
    select {
        font-size: 0.9rem !important;
        padding: 10px 12px !important;
    }
}

/* Extra Small Devices (< 375px) */
@media (max-width: 374px) {
    h1 {
        font-size: 1.35rem !important;
    }

    h2 {
        font-size: 1.15rem !important;
    }

    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .action-btn {
        padding: 4px 10px !important;
        font-size: 0.7rem !important;
    }

    .copy-all-btn {
        padding: 6px 14px !important;
        font-size: 0.75rem !important;
    }

    .format-toggle {
        padding: 3px 8px !important;
        font-size: 0.8rem !important;
    }
}

/* Tablet Optimization (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .messages-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .format-section {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ========== TOGGLE SWITCH FIX ========== */
.toggle-switch {
    height: 20px !important;
    width: 40px !important;
    border-radius: 20px !important;
    background-color: #cbd5e0 !important;
    position: relative !important;
    display: inline-block !important;
    transition: background-color 0.3s ease !important;
}

.toggle-slider {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

.toggle-slider::before {
    content: '' !important;
    position: absolute !important;
    height: 14px !important;
    width: 14px !important;
    left: 3px !important;
    top: 3px !important;
    bottom: auto !important;
    transform: none !important;
    background-color: white !important;
    border-radius: 50% !important;
    transition: left 0.3s ease !important;
}

/* Active State */
.format-toggle.active .toggle-switch,
input:checked+.toggle-slider {
    background-color: #ff4d6d !important;
}

.format-toggle.active .toggle-slider::before,
input:checked+.toggle-slider::before {
    left: 23px !important;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .toggle-switch {
        width: 36px !important;
        height: 18px !important;
    }

    .toggle-slider::before {
        width: 12px !important;
        height: 12px !important;
        left: 3px !important;
        top: 3px !important;
    }

    .format-toggle.active .toggle-slider::before,
    input:checked+.toggle-slider::before {
        left: 21px !important;
    }
}