/* Custom styles for Empty WhatsApp Message Sender */

/* Base styles and variables */
:root {
    --primary-color: #25D366;
    --primary-dark: #128C7E;
    --secondary-color: #34B7F1;
    --background-light: #f0fdf4;
    --card-light: rgba(255, 255, 255, 0.9);
    --text-dark: #111827;
    --text-light: #f3f4f6;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition-normal: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --border-radius: 1.25rem;
    --transition-colors: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    overflow-x: hidden;
}

body {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%2325d366' fill-opacity='0.05'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.dark body {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0  100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%2325d366' fill-opacity='0.1'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-color: #1a1a1a;
    transition: background-color 0.5s ease;
}

/* Header animations */
header h1 {
    position: relative;
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

header p {
    opacity: 0.8;
    max-width: 500px;
    margin: 1.5rem auto 0;
}

/* Enhanced card styles with glassmorphism */
.card {
    background: var(--card-light);
    border-radius: var(--border-radius);
    backdrop-filter: blur(16px);
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    z-index: 1;
    transition: 0.6s;
}

.card:hover::before {
    left: 100%;
}

/* Dark mode styles for cards */
.dark .card {
    background: rgba(17, 24, 39, 0.8);
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.3),
        0 4px 6px -2px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark .card:hover {
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 10px 10px -5px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Enhanced button styles */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.2rem;
    border-radius: 0.8rem;
    color: white;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    transform: scale(0);
    opacity: 0;
    border-radius: 50%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover::after {
    transform: scale(2.5);
    opacity: 1;
}

/* WhatsApp button specific style */
.btn.bg-green-500 {
    background: linear-gradient(45deg, #25D366, #128C7E);
    border: none;
}

/* Copy button specific style */
.btn.bg-blue-500 {
    background: linear-gradient(45deg, #34B7F1, #0088cc);
    border: none;
}

/* Test button specific style */
.btn.bg-purple-500 {
    background: linear-gradient(45deg, #8a3ffc, #6929c4);
    border: none;
}

/* Character option buttons with enhanced styling */
.character-option {
    padding: 0.9rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dark .character-option {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
}

.character-option::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.character-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.character-option.active {
    background: linear-gradient(45deg, #25D366, #128C7E);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dark .character-option.active {
    background: linear-gradient(45deg, #128C7E, #075E54);
}

/* Enhanced range slider styling */
input[type="range"] {
    height: 8px;
    -webkit-appearance: none;
    margin: 15px 0;
    background: linear-gradient(90deg, #d1d5db, #9ca3af);
    border-radius: 5px;
    position: relative;
}

.dark input[type="range"] {
    background: linear-gradient(90deg, #374151, #4b5563);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(45deg, #25D366, #128C7E);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    transition: transform 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.dark input[type="range"]::-webkit-slider-thumb {
    background: linear-gradient(45deg, #128C7E, #075E54);
    border: 2px solid #374151;
}

/* Enhanced animations for clipboard feedback */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.pulse {
    animation: pulse 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced success and error message styling */
.success-msg {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: rgb(4, 120, 87);
    border-radius: 0.8rem;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
}

.dark .success-msg {
    background: rgba(16, 185, 129, 0.15);
    color: rgb(110, 231, 183);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: rgb(185, 28, 28);
    border-radius: 0.8rem;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.1);
    backdrop-filter: blur(10px);
}

.dark .error-msg {
    background: rgba(239, 68, 68, 0.15);
    color: rgb(252, 165, 165);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Preview area styling */
#previewArea {
    min-height: 100px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.dark #previewArea {
    background-color: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark mode toggle button enhancement */
#darkModeToggle {
    position: relative;
    height: 40px;
    width: 40px;
    background: linear-gradient(135deg, #f3f4f6, #d1d5db);
    border-radius: 50%;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark #darkModeToggle {
    background: linear-gradient(135deg, #374151, #1f2937);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

#darkModeToggle:hover {
    transform: rotate(15deg);
}

/* Enhanced Dark Mode Toggle Button */
#darkModeToggle {
    position: relative;
    height: 48px;
    width: 48px;
    border-radius: 50%;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Light mode styles */
#darkModeToggle {
    background: linear-gradient(135deg, #ffd700, #FFA500);
}

#darkModeToggle .fa-moon {
    transform: translateY(100%);
    opacity: 0;
}

#darkModeToggle .fa-sun {
    transform: translateY(0);
    opacity: 1;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Dark mode styles */
.dark #darkModeToggle {
    background: linear-gradient(135deg, #2C3E50, #3498DB);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.dark #darkModeToggle .fa-moon {
    transform: translateY(0);
    opacity: 1;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.dark #darkModeToggle .fa-sun {
    transform: translateY(-100%);
    opacity: 0;
}

/* Button hover effects */
#darkModeToggle:hover {
    transform: scale(1.1) rotate(8deg);
    cursor: pointer;
}

/* Enhanced transitions for dark mode switch */
.dark body {
    background-color: #1a1a1a;
    transition: background-color 0.5s ease;
}

/* Theme transition effects */
body * {
    transition: background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

/* Theme switch animation */
@keyframes switchTheme {
    0% {
        transform: scale(1) rotate(0);
    }

    50% {
        transform: scale(0.8) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
    }
}

.theme-switching {
    animation: switchTheme 0.5s ease;
}

/* Dark mode icon styles */
#darkModeToggle i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Hover effect for text input/textarea */
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
    outline: none;
}

/* Enhanced tooltip animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#tooltip {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-visible {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .card {
        padding: 1.25rem;
        border-radius: 1rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    header h1 {
        font-size: 1.75rem;
    }
}

/* Added floating bubbles animation in background */
.bubble {
    position: fixed;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.1);
    animation: float 8s infinite ease-in-out;
    z-index: -1;
    backdrop-filter: blur(2px);
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 0.5;
    }

    100% {
        transform: translateY(0) rotate(360deg);
        opacity: 1;
    }
}

/* Additional utility classes */
.hidden {
    display: none;
}

/* Flashing animation for success feedback */
@keyframes flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.flash {
    animation: flash 0.5s ease;
}

/* New animation classes */
.animate-spin-slow {
    animation: spin 15s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-bounce-light {
    animation: bounce-light 2s ease-in-out infinite;
}

@keyframes bounce-light {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-slow {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

/* Ripple effect for buttons */
.btn,
.character-option {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Better visualization for invisible characters */
.invisible-char {
    display: inline-block;
    position: relative;
    min-height: 24px;
    min-width: 100px;
    margin: 4px 0;
    padding: 10px 30px;
    background: repeating-linear-gradient(45deg,
            rgba(0, 200, 83, 0.1),
            rgba(0, 200, 83, 0.1) 10px,
            rgba(255, 255, 255, 0.3) 10px,
            rgba(255, 255, 255, 0.3) 20px);
    border: 2px dashed var(--primary-light-color);
    border-radius: 6px;
    animation: pulse-slow 2s infinite;
}

.dark .invisible-char {
    background: repeating-linear-gradient(45deg,
            rgba(0, 200, 83, 0.15),
            rgba(0, 200, 83, 0.15) 10px,
            rgba(30, 30, 30, 0.3) 10px,
            rgba(30, 30, 30, 0.3) 20px);
    border: 2px dashed var(--primary-color);
}

.invisible-char::before,
.invisible-char::after {
    content: '👻';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.7;
}

.invisible-char::before {
    left: 4px;
}

.invisible-char::after {
    right: 4px;
}

/* Add a tooltip to explain what's happening */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: rgba(50, 50, 50, 0.95);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Enhanced Background Animations */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.floating-bubble {
    position: absolute;
    background: radial-gradient(circle at 30% 30%, rgba(37, 211, 102, 0.15), transparent);
    border-radius: 50%;
    animation: floatBubble var(--duration) ease-in-out infinite;
    backdrop-filter: blur(1px);
}

.dark .floating-bubble {
    background: radial-gradient(circle at 30% 30%, rgba(37, 211, 102, 0.1), transparent);
}

@keyframes floatBubble {

    0%,
    100% {
        transform: translateY(0) translateX(0) scale(1);
    }

    50% {
        transform: translateY(calc(var(--distance) * -1)) translateX(var(--shift)) scale(1.1);
    }
}

.particle {
    position: absolute;
    background: linear-gradient(135deg, var(--primary-color), transparent);
    border-radius: 50%;
    animation: particleFloat var(--duration) ease-in-out infinite;
    opacity: 0.1;
}

.dark .particle {
    opacity: 0.05;
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(calc(var(--distance) * -1)) rotate(180deg);
    }
}

.glow {
    position: absolute;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 8s ease-in-out infinite;
    opacity: 0.1;
}

.dark .glow {
    opacity: 0.05;
}

@keyframes glowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.15;
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 640px) {
    .container {
        padding: 1rem !important;
    }

    main {
        width: 100% !important;
        padding: 0 0.5rem;
    }

    header h1 {
        font-size: 1.75rem !important;
        line-height: 2rem;
    }

    header p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .card {
        padding: 1.25rem !important;
        margin-bottom: 1.5rem !important;
    }

    .character-option {
        padding: 0.75rem !important;
        font-size: 0.875rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        width: 100%;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    #previewArea {
        min-height: 80px;
        margin: 0.5rem 0;
    }

    textarea {
        min-height: 100px;
    }

    footer {
        margin-top: 2rem !important;
        padding-bottom: 2rem;
    }

    /* Center align everything on mobile */
    .container {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        justify-content: center;
    }

    /* Improve touch targets */
    .character-option,
    .btn,
    #darkModeToggle {
        min-height: 44px;
        touch-action: manipulation;
    }

    /* Better spacing for mobile */
    .mb-8 {
        margin-bottom: 1.5rem !important;
    }

    .mb-12 {
        margin-bottom: 2rem !important;
    }

    /* Adjust slider for touch */
    input[type="range"] {
        height: 12px;
    }

    input[type="range"]::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }

    /* Improve mobile dark mode toggle */
    #darkModeToggle {
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 50;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .dark #darkModeToggle {
        background: rgba(17, 24, 39, 0.9);
    }
}

/* Additional responsive improvements */
@media (max-width: 380px) {
    header h1 {
        font-size: 1.5rem !important;
    }

    .grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    .character-option {
        text-align: center;
    }
}

/* Fix for notched phones */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* About section enhancements */
.prose p {
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .prose p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .flex.flex-wrap.gap-2 span {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
}

/* Keyword tags animation */
.bg-green-100 {
    transition: all 0.3s ease;
}

.bg-green-100:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced About Section Styles */
.about-section {
    perspective: 1000px;
    position: relative;
    z-index: 1;
    margin: 2rem auto;
}

.about-section .card {
    position: relative;
    z-index: 2;
    background: var(--card-light);
}

.reveal-content {
    position: relative;
    z-index: 3;
}

/* Fix for stacking context */
.about-section .floating-bubble,
.about-section .particle,
.about-section .glow {
    z-index: 1;
}

/* Ensure content visibility */
.about-section p,
.about-section h2,
.about-section h3,
.about-section .feature-card,
.about-section .keyword-cloud {
    position: relative;
    z-index: 4;
}

/* Mobile responsiveness for about section */
@media (max-width: 640px) {
    .about-section {
        margin: 1rem auto;
        padding: 0 1rem;
    }

    .about-section .card {
        padding: 1.25rem;
    }

    .feature-card-container {
        margin: 1.5rem 0;
    }

    .keyword-cloud {
        gap: 0.5rem;
    }
}

/* Enhanced About Section Styles */
.about-section {
    perspective: 1000px;
}

.text-gradient {
    background: linear-gradient(135deg, #25D366, #34B7F1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 8s ease infinite;
}

.animate-width {
    animation: expandWidth 1s ease-out forwards;
}

.animate-float-slow {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 6s ease-in-out infinite;
    animation-delay: 2s;
}

.feature-card {
    @apply bg-white/80 dark:bg-gray-800/80 p-6 rounded-xl shadow-lg backdrop-blur-sm;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.keyword-cloud span {
    @apply px-4 py-2 bg-green-100/80 dark:bg-green-900/80 text-green-700 dark:text-green-300 rounded-full text-sm transition-all duration-300 backdrop-blur-sm cursor-pointer;
}

.keyword-cloud span:hover {
    @apply bg-green-200 dark:bg-green-800 scale-105 shadow-lg;
    transform: translateY(-2px);
}

/* New Animations */
@keyframes expandWidth {
    from {
        width: 0;
    }

    to {
        width: 5rem;
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.6s ease-out forwards;
}

.animate-slide-up-delayed {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.6s ease-out forwards;
    animation-delay: 0.3s;
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intersection Observer Animations */
.reveal-content>* {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.reveal-content>*.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 640px) {
    .about-section .card {
        padding: 1.5rem;
    }

    .feature-card-container {
        margin: 1rem 0;
    }

    .keyword-cloud span {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* How to Use Section Styles */
.how-to-use-section .step-card {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(0);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.dark .how-to-use-section .step-card {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.how-to-use-section .step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.text-gradient-blue {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.steps-container>div {
    animation-fill-mode: both;
}

.steps-container>div:nth-child(1) {
    animation-delay: 0.2s;
}

.steps-container>div:nth-child(2) {
    animation-delay: 0.4s;
}

.steps-container>div:nth-child(3) {
    animation-delay: 0.6s;
}

.trending-section {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

@media (max-width: 640px) {
    .how-to-use-section .step-card {
        padding: 1.25rem;
    }

    .prose {
        width: 95%;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}