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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden {
    display: none !important;
}

/* Entry Screen Styles */
.entry-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 1s ease;
    padding: 1rem;
}

.entry-content {
    text-align: center;
    padding: 2rem;
    max-width: 100%;
}

.entry-title {
    font-size: clamp(2rem, 6vw, 3rem);
    color: white;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: slideDown 0.8s ease;
}

.entry-instruction {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    color: rgba(255,255,255,0.9);
    margin-bottom: 3rem;
    animation: fadeIn 1.5s ease;
}

.word-sequence {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.word-button {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    padding: clamp(1rem, 3vw, 1.5rem) clamp(1.5rem, 4vw, 2.5rem);
    background: white;
    color: #f5576c;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    opacity: 0.3;
    transform: scale(0.9);
    animation: popIn 0.5s ease forwards;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.word-button:nth-child(1) { animation-delay: 0.2s; }
.word-button:nth-child(2) { animation-delay: 0.4s; }
.word-button:nth-child(3) { animation-delay: 0.6s; }
.word-button:nth-child(4) { animation-delay: 0.8s; }

.word-button.active {
    opacity: 1;
    transform: scale(1);
    animation: pulse 2s infinite;
}

.word-button.clicked {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    opacity: 1;
    transform: scale(1.1);
}

.word-button.clicked:hover {
    transform: scale(1.1);
    cursor: default;
}

.word-button.active:active {
    transform: scale(1.05);
}

.entry-hint {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: rgba(255,255,255,0.8);
    font-style: italic;
    animation: fadeIn 2s ease;
}

/* Main Content */
.main-content {
    animation: fadeIn 1s ease;
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f093fb;
    animation: confettiFall 3s linear forwards;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    padding: 2rem 1rem;
}

.hero-content {
    z-index: 2;
    padding: 1rem;
    max-width: 90%;
}

.glitter-text {
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: white;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
    margin-bottom: 1rem;
    animation: glow 2s ease-in-out infinite;
}

.subtitle {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    animation: fadeIn 2s ease;
    line-height: 1.4;
}

.hero-quote {
    margin: 2rem auto;
    padding: 1.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    animation: fadeIn 3s ease;
    max-width: 600px;
}

.quote-text {
    font-size: clamp(1.3rem, 4vw, 2rem);
    color: white;
    font-style: italic;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    line-height: 1.4;
}

.quote-author {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: rgba(255,255,255,0.8);
    text-align: right;
}

.cta-button {
    padding: 1rem 2.5rem;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    background: white;
    color: #667eea;
    border: 4px solid rgba(255,255,255,0.5);
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.cta-button:active {
    transform: scale(0.95);
}

.floating-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Sticky Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.95);
    padding: 0.8rem 0.5rem;
    display: flex;
    justify-content: center;
    gap: clamp(0.5rem, 2vw, 2rem);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
}

.sticky-nav a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem clamp(0.5rem, 2vw, 1rem);
    border-radius: 20px;
    transition: all 0.3s ease;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    border: 2px solid transparent;
}

.sticky-nav a:hover {
    border-color: #667eea;
}

.sticky-nav a:active {
    background: #667eea;
    color: white;
    transform: translateY(0);
}

/* Sections - add scroll offset for sticky nav */
section {
    scroll-margin-top: 80px;
}

/* Affirmations Section */
.affirmations-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    text-align: center;
}

.affirmations-section h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.section-intro {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.5;
    padding: 0 1rem;
}

.affirmation-box {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin: 2rem auto;
    max-width: 800px;
    min-height: clamp(150px, 30vh, 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.affirmation-text {
    font-size: clamp(1.1rem, 3.5vw, 1.8rem);
    color: #333;
    line-height: 1.6;
    font-style: italic;
}

.affirmation-button {
    padding: 1rem 2rem;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(245,87,108,0.4);
    transition: all 0.3s ease;
    margin-top: 2rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(245,87,108,0.4);
    }
    50% {
        box-shadow: 0 8px 30px rgba(245,87,108,0.6);
        transform: translateY(-2px);
    }
}

.affirmation-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(245,87,108,0.6);
}

.affirmation-counter {
    margin-top: 2rem;
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #666;
}

.affirmation-counter span {
    font-weight: bold;
    color: #f5576c;
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
}

/* Amazing Section */
.amazing-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.amazing-section h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    color: #667eea;
    text-align: center;
    margin-bottom: 2rem;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.fact-card {
    height: clamp(250px, 40vw, 300px);
    perspective: 1000px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.fact-card::after {
    content: '👆 Klicka här';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.8rem;
    color: rgba(102, 126, 234, 0.6);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fact-card.flipped::after {
    opacity: 0;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.fact-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.card-front {
    background: white;
    border: 3px solid transparent;
    transition: border-color 0.3s ease;
}

.fact-card:active .card-front {
    border-color: #667eea;
}

.card-front h3 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: 1rem;
}

.card-front p {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: #333;
    font-weight: bold;
}

.card-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: rotateY(180deg);
}

.card-back p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.6;
}

/* Strength Section */
.strength-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.strength-section h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 1rem;
}

.strength-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 0.5rem;
}

.strength-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.strength-card {
    position: relative;
}

.strength-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    border: 3px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.strength-card:active {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}

.strength-card:active::after {
    border-color: rgba(102, 126, 234, 0.3);
}

.strength-icon {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    margin-bottom: 1rem;
}

.strength-card h3 {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    color: #667eea;
    margin-bottom: 1rem;
}

.strength-card p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: #666;
    line-height: 1.6;
}

/* Humor Section */
.humor-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.humor-section h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 2rem;
}

.humor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.humor-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    border: 3px solid rgba(102, 126, 234, 0.2);
}

.humor-card::before {
    content: '👉';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    animation: pointRight 1.5s ease-in-out infinite;
}

@keyframes pointRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.humor-card:active {
    transform: scale(0.98);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.humor-front {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-weight: bold;
    color: #667eea;
    text-align: center;
}

.humor-back {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #333;
    line-height: 1.6;
    text-align: center;
}

/* Thailand Section */
.thailand-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    text-align: center;
}

.thailand-section h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    color: #d63031;
    margin-bottom: 1rem;
}

.thailand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 0.5rem;
}

.thailand-card {
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.thailand-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.thailand-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.5s ease;
}

.thailand-card:hover .thailand-image {
    transform: scale(1.1);
}

.thailand-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 2rem 1rem 1rem;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.thailand-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.thailand-overlay p {
    font-size: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.thailand-card:hover .thailand-overlay p {
    opacity: 1;
    transform: translateY(0);
}

.thailand-message {
    max-width: 700px;
    margin: 3rem auto 0;
    background: rgba(255,255,255,0.9);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.thailand-message p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #333;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.thailand-message strong {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: #d63031;
}

/* Calle Section */
.calle-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.message-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}

.message-container h2 {
    font-size: clamp(2rem, 6vw, 3rem);
    color: #667eea;
    text-align: center;
    margin-bottom: 2rem;
}

.personal-message {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.8;
    color: #333;
}

.personal-message p {
    margin-bottom: 1.5rem;
}

.personal-message ul {
    margin: 1.5rem 0 1.5rem 1.5rem;
}

.personal-message li {
    margin-bottom: 0.8rem;
}

.signature {
    font-style: italic;
    color: #667eea;
    font-weight: bold;
    text-align: right;
    margin-top: 2rem;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
}

.celebrate-button {
    display: block;
    margin: 2rem auto 0;
    padding: 1rem 2rem;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(245,87,108,0.4);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

.celebrate-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(245,87,108,0.6);
}

/* Floating Button */
.floating-button {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(245,87,108,0.5);
    z-index: 1000;
    transition: all 0.3s ease;
    font-weight: bold;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    border: 3px solid rgba(255,255,255,0.4);
    animation: floatingPulse 2.5s ease-in-out infinite;
}

@keyframes floatingPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(245,87,108,0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 12px 35px rgba(245,87,108,0.7);
        transform: scale(1.05);
    }
}

.floating-button:active {
    transform: scale(0.95);
}

.floating-button-text {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
}

footer p {
    margin: 0.5rem 0;
    font-size: clamp(1rem, 3vw, 1.2rem);
}

.footer-small {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: rgba(255,255,255,0.7);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 0.3;
        transform: scale(0.9);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255,255,255,0.5);
    }
    50% {
        text-shadow: 0 0 40px rgba(255,255,255,0.8);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    section {
        scroll-margin-top: 100px;
    }
    
    .hero {
        min-height: 100svh;
        scroll-margin-top: 0;
    }
    
    .hero-content {
        max-width: 95%;
    }
    
    .word-sequence {
        gap: 0.8rem;
    }
    
    .entry-content {
        padding: 1rem;
    }
    
    .sticky-nav {
        padding: 0.6rem 0.3rem;
        gap: 0.4rem;
    }
    
    .sticky-nav a {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
        border-width: 2px;
    }
    
    /* Make interactive elements more obvious on mobile */
    .fact-card::after {
        font-size: 0.9rem;
        bottom: 15px;
        right: 15px;
    }
    
    .humor-card::before {
        font-size: 1.5rem;
    }
    
    .affirmation-button,
    .celebrate-button {
        min-height: 50px;
    }
    
    .affirmations-section,
    .amazing-section,
    .strength-section,
    .humor-section,
    .calle-section {
        padding: 2rem 0.5rem;
    }
    
    .affirmation-box {
        padding: 1.5rem 1rem;
        margin: 1.5rem 0.5rem;
    }
    
    .message-container {
        padding: 1.5rem 1rem;
    }
    
    .floating-button {
        bottom: 1rem;
        right: 1rem;
        padding: 0.7rem 1.2rem;
    }
    
    /* Better touch targets */
    .word-button,
    .cta-button,
    .affirmation-button,
    .celebrate-button {
        min-height: 44px;
        min-width: 44px;
    }
}

@media (max-width: 480px) {
    section {
        scroll-margin-top: 120px;
    }
    
    .hero {
        scroll-margin-top: 0;
    }
    
    .facts-grid,
    .strength-cards,
    .humor-cards,
    .thailand-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .fact-card {
        height: 220px;
    }
    
    .thailand-card {
        height: 250px;
    }
    
    .hero-quote {
        padding: 1rem;
    }
    
    .sticky-nav a {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
}

/* Landscape mobile fix */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 1rem;
    }
    
    .entry-screen {
        overflow-y: auto;
    }
}
