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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
}

/* Hero Section - More Slick Design */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    padding: 3rem 4rem;
    z-index: 2;
    position: relative;
}

.memorial-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 2rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.memorial-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.hero-message {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 1rem;
    font-weight: 400;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-width: 80px;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: none;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.3rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-image {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
}

/* Tab Navigation */
.tab-navigation {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    display: block;
}

.tab-container {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    border-radius: 8px;
    margin: 0.5rem;
    flex: 1;
    border-bottom: 3px solid transparent;
}

.tab-btn i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.tab-btn:hover i {
    transform: translateY(-2px);
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.tab-btn.active i {
    color: #667eea;
    transform: scale(1.1);
}

/* Tab Content */
.tab-content-container {
    min-height: 60vh;
    background: white;
}

.tab-content {
    display: none;
    padding: 3rem 2rem;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.tab-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.tab-header h2 i {
    color: #667eea;
}

.tab-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Section Styles */
section {
    padding: 4rem 3rem;
}

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

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Gallery Section */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.gallery-info {
    color: #666;
    font-weight: 500;
}

.gallery-actions {
    display: flex;
    gap: 1rem;
}

.gallery-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.gallery-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.gallery-btn.expanded {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.gallery-btn.expanded i {
    transform: rotate(180deg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1rem 1rem;
    font-size: 0.9rem;
}

/* Gallery Pagination */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.page-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.page-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-dots {
    display: flex;
    gap: 0.8rem;
}

.page-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-dot.active {
    background: #667eea;
    transform: scale(1.3);
}

.page-dot:hover {
    background: #667eea;
    transform: scale(1.1);
}

/* Ode Section - Enhanced Design */
.ode-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.ode-header {
    margin-bottom: 3rem;
}

.ode-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.ode-header h2 i {
    color: #f093fb;
}

.ode-subtitle {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
}

.ode-content {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 4rem 3rem;
    border-radius: 30px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(240, 147, 251, 0.3);
}

.ode-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(180deg);
    }
}

.ode-text {
    font-size: 1.3rem;
    line-height: 2;
    text-align: center;
    font-style: italic;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ode-text p {
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.ode-text p:nth-child(1) {
    animation-delay: 0.1s;
}

.ode-text p:nth-child(2) {
    animation-delay: 0.2s;
}

.ode-text p:nth-child(3) {
    animation-delay: 0.3s;
}

.ode-text p:nth-child(4) {
    animation-delay: 0.4s;
}

.ode-text p:nth-child(5) {
    animation-delay: 0.5s;
}

.ode-text p:nth-child(6) {
    animation-delay: 0.6s;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ode-decoration {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.ode-decoration i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    animation: float 3s ease-in-out infinite;
}

.ode-decoration i:nth-child(1) {
    animation-delay: 0s;
}

.ode-decoration i:nth-child(2) {
    animation-delay: 1s;
}

.ode-decoration i:nth-child(3) {
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Floating Bubbles in Ode Section */
.floating-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    opacity: 0;
    transform: translateY(100px) scale(0);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bubble.visible {
    opacity: 0.8;
    transform: translateY(0) scale(1);
}

.bubble.fade-out {
    opacity: 0;
    transform: translateY(-100px) scale(0.5);
}

/* Different bubble sizes */
.bubble.small {
    width: 60px;
    height: 60px;
}

.bubble.medium {
    width: 80px;
    height: 80px;
}

.bubble.large {
    width: 100px;
    height: 100px;
}

/* Floating animation for bubbles */
.bubble.floating {
    animation: bubbleFloat 6s ease-in-out infinite;
}

@keyframes bubbleFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    25% {
        transform: translateY(-20px) rotate(5deg) scale(1.05);
    }

    50% {
        transform: translateY(-10px) rotate(-3deg) scale(0.95);
    }

    75% {
        transform: translateY(-25px) rotate(7deg) scale(1.02);
    }
}

/* Bubble glow effect */
.bubble::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bubble:hover::before {
    opacity: 1;
}

/* Quirks Section */
/* Quirks Mode Toggle */
.quirks-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mode-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mode-btn:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.mode-btn i {
    font-size: 1rem;
}

/* Random Quirk Controls */
.quirks-random-controls {
    text-align: center;
    margin-top: 2rem;
}

.learn-quirk-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.learn-quirk-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.learn-quirk-btn:active {
    transform: translateY(0);
}

.learn-quirk-btn i {
    font-size: 1.2rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(180deg);
    }
}

.quirks-container {
    max-width: 800px;
    margin: 0 auto;
}

.quirks-display {
    padding: 4rem 3rem;
    border-radius: 25px;
    text-align: center;
    color: white;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    transition: all 0.5s ease-in-out;
}

.quirks-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 8s ease-in-out infinite;
}

/* ASCII art styling removed from quirks */

/* ASCII Art Portrait in Memories Tab */
.ascii-portrait-container {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tino-ascii-portrait {
    font-family: 'Courier New', monospace;
    font-size: 0.4rem;
    line-height: 0.9;
    color: rgba(255, 255, 255, 0.8);
    white-space: pre;
    margin: 0 auto 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    max-width: 90%;
    overflow-x: auto;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: asciiGlow 8s ease-in-out infinite;
}

.ascii-portrait-title h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.ascii-portrait-title p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    margin: 0;
    font-style: italic;
}

@keyframes asciiGlow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
        transform: scale(1);
    }

    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
        transform: scale(1.005);
    }
}

.quirk-item {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.quirk-emoji {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

.quirk-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.quirk-description {
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.95;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.quirks-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.quirk-nav-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.quirk-nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.quirk-dots {
    display: flex;
    gap: 0.8rem;
}

.quirk-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quirk-dot.active {
    background: #667eea;
    transform: scale(1.3);
}

.quirk-dot:hover {
    background: #667eea;
    transform: scale(1.1);
}

/* Videos Section */
.videos-section {
    background: #f8f9fa;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.video-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.video-item video {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.video-caption {
    padding: 1.5rem;
    text-align: center;
}

/* Floating Heart Button */
.floating-heart {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.heart-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.heart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.heart-btn.liked {
    animation: heartPulse 0.6s ease;
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Memory Form */
.memory-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Memory Postcards - Scattered Layout */
.memories-list {
    position: relative;
    min-height: 400px;
    padding: 2rem;
    margin: 2rem 0;
}

.memory-card {
    position: absolute;
    background: linear-gradient(135deg, #fff9c4, #fff);
    padding: 1.5rem;
    border-radius: 8px;
    width: 280px;
    max-width: 90vw;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-family: 'Courier New', monospace;
    transform-origin: center;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    /* Prevent text selection on mobile */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: manipulation;
    /* Improve touch responsiveness */
}

.memory-card:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.memory-card:nth-child(1) {
    transform: rotate(-2deg);
    top: 20px;
    left: 10%;
    background: linear-gradient(135deg, #fff9c4, #fff);
}

.memory-card:nth-child(2) {
    transform: rotate(3deg);
    top: 80px;
    right: 15%;
    background: linear-gradient(135deg, #f0f9ff, #fff);
}

.memory-card:nth-child(3) {
    transform: rotate(-1deg);
    top: 160px;
    left: 20%;
    background: linear-gradient(135deg, #fdf2f8, #fff);
}

.memory-card:nth-child(4) {
    transform: rotate(2deg);
    top: 220px;
    right: 10%;
    background: linear-gradient(135deg, #f0fff4, #fff);
}

.memory-card:nth-child(5) {
    transform: rotate(-3deg);
    top: 300px;
    left: 15%;
    background: linear-gradient(135deg, #fef7ff, #fff);
}

.memory-card:nth-child(6) {
    transform: rotate(1deg);
    top: 380px;
    right: 20%;
    background: linear-gradient(135deg, #fffbeb, #fff);
}

.memory-header {
    margin-bottom: 1rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
    padding-bottom: 0.5rem;
}

.memory-author {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.memory-date {
    color: #718096;
    font-size: 0.8rem;
    font-style: italic;
}

.memory-text {
    color: #4a5568;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Add more positions for additional cards */
.memory-card:nth-child(n+7) {
    position: relative;
    display: inline-block;
    margin: 1rem;
    transform: rotate(0deg);
}

/* Enhanced Memory Card Interactions */
.memory-card {
    /* ... existing styles ... */
    cursor: pointer;
    user-select: none;
    /* Prevent text selection on mobile */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: manipulation;
    /* Improve touch responsiveness */
}

.memory-card-front {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25) !important;
    border: 2px solid rgba(102, 126, 234, 0.3) !important;
}

/* Mobile-specific memory card improvements */
@media (max-width: 768px) {
    .memories-list {
        min-height: 500px;
        /* More space for scattered cards */
        padding: 1rem;
    }

    .memory-card {
        width: 260px !important;
        /* Slightly smaller on mobile */
        max-width: 85vw !important;
        padding: 1.2rem !important;
        font-size: 0.9rem;
        /* Ensure cards are tappable */
        min-height: 120px;
    }

    .memory-card:hover {
        /* Remove hover effects on mobile, use click instead */
        transform: inherit !important;
        box-shadow: inherit !important;
    }

    .memory-card:active {
        /* Add active state for mobile tap feedback */
        transform: scale(0.98) !important;
    }

    /* Adjust positioning for mobile to reduce overlap */
    .memory-card:nth-child(1) {
        top: 10px !important;
        left: 5% !important;
    }

    .memory-card:nth-child(2) {
        top: 60px !important;
        right: 10% !important;
    }

    .memory-card:nth-child(3) {
        top: 130px !important;
        left: 15% !important;
    }

    .memory-card:nth-child(4) {
        top: 180px !important;
        right: 5% !important;
    }

    .memory-card:nth-child(5) {
        top: 250px !important;
        left: 10% !important;
    }

    .memory-card:nth-child(6) {
        top: 300px !important;
        right: 15% !important;
    }

    /* Additional cards for mobile */
    .memory-card:nth-child(7) {
        top: 370px !important;
        left: 20% !important;
        transform: rotate(1deg) !important;
    }

    .memory-card:nth-child(8) {
        top: 420px !important;
        right: 8% !important;
        transform: rotate(-2deg) !important;
    }
}

/* Add a subtle tap indicator */
@media (max-width: 768px) {
    .memory-card::before {
        content: '';
        position: absolute;
        top: 5px;
        right: 5px;
        width: 8px;
        height: 8px;
        background: rgba(102, 126, 234, 0.3);
        border-radius: 50%;
        opacity: 0.7;
        animation: tapHint 2s ease-in-out infinite;
    }

    .memory-card-front::before {
        display: none;
        /* Hide hint when card is active */
    }
}

@keyframes tapHint {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

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

.footer-stats {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    opacity: 0.6;
    color: rgba(255, 255, 255, 0.6);
}

.footer-stat {
    font-weight: 300;
}

.footer-divider {
    margin: 0 0.8rem;
    opacity: 0.4;
}

.footer-hearts {
    margin-top: 1rem;
    font-size: 1.5rem;
    color: #ff6b6b;
}

.footer-hearts i {
    margin: 0 0.5rem;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        height: auto;
        min-height: 70vh;
    }

    .hero-content {
        padding: 2rem 1.5rem;
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-item {
        padding: 1rem 1.5rem;
    }

    .tab-container {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .tab-btn {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
        flex: 1;
        min-width: 120px;
    }

    .tab-btn span {
        display: none;
    }

    .tab-btn i {
        font-size: 1.5rem;
    }

    .tab-content {
        padding: 2rem 1.5rem;
    }

    .tab-header h2 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .ode-content {
        padding: 2.5rem 2rem;
        border-radius: 20px;
    }

    .ode-text {
        font-size: 1.1rem;
        line-height: 1.8;
    }

    .quirks-display {
        padding: 2.5rem 2rem;
        min-height: 250px;
    }

    .quirk-emoji {
        font-size: 3rem;
    }

    .quirk-title {
        font-size: 1.5rem;
    }

    .quirk-description {
        font-size: 1rem;
    }

    .ascii-background {
        right: 1rem;
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.25);
    }

    .quirks-controls {
        gap: 1rem;
    }

    .quirk-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .gallery-controls {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .gallery-actions {
        justify-content: center;
    }

    .gallery-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }

    .gallery-pagination {
        gap: 1rem;
    }

    .page-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }

    .floating-heart {
        bottom: 1rem;
        right: 1rem;
    }

    .heart-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .memory-form {
        padding: 1.5rem;
    }
}

/* Mobile Content Visibility Fix */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    /* Fix tab content container */
    .tab-content-container {
        min-height: auto !important;
        overflow: visible !important;
        padding-bottom: 2rem;
    }

    /* Fix all tab content */
    .tab-content {
        display: none;
        padding: 1.5rem 1rem !important;
        min-height: auto !important;
        overflow: visible !important;
    }

    .tab-content.active {
        display: block !important;
    }

    /* Fix Videos Tab specifically */
    #videos {
        min-height: auto !important;
        padding: 1.5rem 1rem !important;
    }

    #videos .videos-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        padding: 1rem 0;
    }

    #videos .video-item {
        margin-bottom: 1.5rem;
        width: 100%;
    }

    #videos .video-item video {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 200px;
    }

    /* Fix Ode Tab specifically */
    #ode {
        min-height: auto !important;
        padding: 1.5rem 1rem !important;
    }

    #ode .ode-container {
        width: 100%;
        max-width: 100%;
    }

    #ode .ode-content {
        padding: 2rem 1.5rem !important;
        margin: 1rem 0 !important;
        min-height: auto !important;
        border-radius: 20px;
    }

    #ode .ode-text {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem;
    }

    /* Fix tab button text visibility */
    .tab-btn span {
        display: inline !important;
        font-size: 0.75rem;
    }

    /* Enable floating bubbles on mobile but make them smaller and fewer */
    .floating-bubbles {
        display: block !important;
    }

    /* Make bubbles smaller and less intensive on mobile */
    @media (max-width: 768px) {
        .bubble {
            opacity: 0.6 !important;
            /* More subtle */
        }

        .bubble.small {
            width: 40px !important;
            height: 40px !important;
        }

        .bubble.medium {
            width: 50px !important;
            height: 50px !important;
        }

        .bubble.large {
            width: 60px !important;
            height: 60px !important;
        }

        /* Reduce animation intensity */
        .bubble.floating {
            animation: bubbleFloatMobile 8s ease-in-out infinite !important;
        }
    }

    /* Gentler mobile bubble animation */
    @keyframes bubbleFloatMobile {

        0%,
        100% {
            transform: translateY(0) rotate(0deg) scale(1);
        }

        25% {
            transform: translateY(-10px) rotate(2deg) scale(1.02);
        }

        50% {
            transform: translateY(-5px) rotate(-1deg) scale(0.98);
        }

        75% {
            transform: translateY(-12px) rotate(3deg) scale(1.01);
        }
    }

    /* Fix hero section height on mobile */
    .hero-section {
        min-height: 60vh !important;
        height: auto;
    }

    /* Make sure tab navigation is visible */
    .tab-navigation {
        position: sticky;
        top: 0;
        z-index: 100;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        padding: 0.5rem 0;
    }
}

@media (max-width: 480px) {

    /* Extra fixes for very small screens */
    .tab-content {
        padding: 1rem 0.8rem !important;
    }

    #videos .video-item video {
        min-height: 180px;
    }

    #ode .ode-content {
        padding: 1.5rem 1rem !important;
    }

    #ode .ode-text {
        font-size: 0.9rem !important;
    }

    .hero-section {
        min-height: 50vh !important;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

/* EMERGENCY MOBILE FIX */
@media screen and (max-width: 768px) {

    /* Fix tab buttons */
    .tab-navigation {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        background: white !important;
        padding: 0.5rem 0 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    }

    .tab-container {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 1rem !important;
    }

    .tab-btn {
        min-width: 80px !important;
        padding: 1rem 0.8rem !important;
        font-size: 0.8rem !important;
        flex-shrink: 0 !important;
        margin: 0 0.2rem !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border: 2px solid rgba(0, 0, 0, 0.1) !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
    }

    .tab-btn.active {
        background: rgba(102, 126, 234, 0.1) !important;
        border-color: #667eea !important;
        color: #667eea !important;
    }

    .tab-btn span {
        display: block !important;
        font-size: 0.7rem !important;
        margin-top: 0.2rem !important;
    }

    .tab-btn i {
        font-size: 1.2rem !important;
        display: block !important;
    }

    /* Force tab content visibility */
    .tab-content {
        display: none !important;
        padding: 1rem !important;
        min-height: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    .tab-content.active {
        display: block !important;
        visibility: visible !important;
    }

    /* Force videos to show */
    #videos.active {
        display: block !important;
    }

    #videos .videos-grid {
        display: block !important;
        grid-template-columns: none !important;
    }

    #videos .video-item {
        display: block !important;
        margin-bottom: 2rem !important;
        width: 100% !important;
    }

    #videos .video-item video {
        width: 100% !important;
        height: auto !important;
        min-height: 200px !important;
        display: block !important;
    }

    /* Force ode to show */
    #ode.active {
        display: block !important;
    }

    #ode .ode-content {
        display: block !important;
        padding: 1.5rem 1rem !important;
        margin: 1rem 0 !important;
    }

    #ode .ode-text {
        display: block !important;
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
}