/* Custom animations and styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Smooth fade-in animations */
.hero-content {
    animation: fadeInUp 1s ease-out forwards;
}

.dare-section {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transform: translateY(50px);
}

.dare-section.visible {
    opacity: 1 !important;
    transform: translateY(0);
}

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

/* Pulse animation for background blobs */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

.animate-pulse {
    animation: pulse 3s ease-in-out infinite;
}

.delay-1000 {
    animation-delay: 1s;
}

/* Mobile-first responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }
}

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(147, 51, 234, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #ec4899, #a855f7);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #db2777, #9333ea);
}

/* Form focus states */
input:focus,
button:focus {
    outline: 2px solid #ec4899;
    outline-offset: 2px;
}

/* Loading state for form submission */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Emoji size for mobile */
.dare-section > div > div:first-child {
    font-size: 5rem;
}

@media (min-width: 768px) {
    .dare-section > div > div:first-child {
        font-size: 7rem;
    }
}

/* Success message styling */
.success-message {
    color: #86efac;
    animation: slideIn 0.3s ease-out;
}

.error-message {
    color: #fca5a5;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for interactive elements */
a {
    transition: color 0.3s ease;
}

button {
    transition: all 0.3s ease;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    button:hover {
        transform: none;
    }

    /* Larger tap targets for touch */
    button, a, input {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Prevent text selection on touch devices for better UX */
@media (max-width: 768px) {
    h1, h2, .dare-section {
        -webkit-user-select: none;
        -moz-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix for iOS Safari 100vh issue */
    section.min-h-screen {
        min-height: -webkit-fill-available;
    }

    body {
        min-height: -webkit-fill-available;
    }
}

/* Smooth scrolling for all browsers */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Better focus visibility for keyboard navigation */
*:focus-visible {
    outline: 2px solid #ec4899;
    outline-offset: 4px;
}

/* Prevent zoom on input focus (iOS) */
input[type="email"],
textarea {
    font-size: 16px;
}

/* Textarea styling */
textarea {
    font-family: inherit;
    line-height: 1.5;
}

textarea::placeholder {
    opacity: 0.7;
}

/* Character count styling (if added later) */
textarea:focus {
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

/* Active state for touch devices */
button:active,
a:active {
    transform: scale(0.98);
    transition: transform 0.1s;
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 896px) and (orientation: landscape) {
    section {
        min-height: auto;
        padding: 3rem 1.5rem;
    }

    .dare-section > div > div:first-child {
        font-size: 4rem;
    }
}

/* Extra small phone adjustments */
@media (max-width: 380px) {
    /* Reduce padding further on very small devices */
    section {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Ensure form fits */
    form {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Smaller text on tiny screens */
    h2 {
        font-size: 1.75rem !important;
    }
}

/* Ensure textarea doesn't cause zoom on any iOS device */
@media (max-width: 768px) {
    textarea,
    input[type="email"] {
        font-size: 16px !important;
    }
}

/* Prevent horizontal scroll */
body, html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Ensure all text wraps properly */
* {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Navigation hints styling */
#nav-hints {
    font-family: inherit;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Hide navigation hints on very small screens to avoid clutter */
@media (max-height: 600px) {
    #nav-hints {
        display: none;
    }
}
