.home-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-top: 0;
}

.home-header h1 {
    font-size: 4rem;
    margin-bottom: 0;
    animation: fadeInDown 0.8s ease;
    cursor: pointer;
    user-select: none;
}

.home-header h1:hover {
    color: var(--accent-primary);
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.8s ease 0.2s backwards;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
    animation: fadeInDown 0.8s ease 0.4s backwards;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border-light);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hover effect ONLY for devices with hover capability */
@media (hover: hover) and (pointer: fine) {
    .social-links a:hover {
        background: var(--accent-primary);
        border-color: var(--accent-primary);
        color: var(--white);
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(45, 80, 22, 0.2);
    }
}

/* Touch feedback for touch devices */
@media (hover: none), (pointer: coarse) {
    .social-links a:active {
        background: var(--accent-primary);
        border-color: var(--accent-primary);
        color: var(--white);
        transform: scale(0.95);
    }
}

.avatar-image {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--border-light);
    margin-bottom: 0.75rem;
    animation: bounce 2s ease-in-out infinite;
}

.card-back .avatar-image {
    width: 55px;
    height: 55px;
    border-color: rgba(255, 255, 255, 0.5);
    animation: none;
}

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

/* Worlds Container */
.worlds-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem 0;
    margin-bottom: 3rem;
}

/* World Cards - Card Flip */
.world-card {
    position: relative;
    height: 240px;
    perspective: 1000px;
    text-decoration: none;
    animation: fadeInUp 0.6s ease backwards;
}

.world-card:nth-child(1) { animation-delay: 0.1s; }
.world-card:nth-child(2) { animation-delay: 0.2s; }
.world-card:nth-child(3) { animation-delay: 0.3s; }
.world-card:nth-child(4) { animation-delay: 0.4s; }

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

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

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
    .world-card:hover .card-inner {
        transform: rotateY(180deg);
    }

    .world-card:hover .card-front,
    .world-card:hover .card-back {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    }
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    border: 2px solid var(--border-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

/* Front of card */
.card-front {
    z-index: 2;
}

/* Back of card */
.card-back {
    transform: rotateY(180deg);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.card-front h2 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

/* Back side styling - ONLY for desktop with flip */
@media (min-width: 1025px) {
    .card-back {
        background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
        color: var(--white);
    }

    .card-back h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        color: var(--white);
    }

    .card-back p {
        font-size: 1.05rem;
        line-height: 1.6;
        color: var(--white);
        opacity: 0.95;
    }

    .world-about .card-back,
    .world-travel .card-back {
        background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    }
}

.card-back-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.card-back-content {
    text-align: center;
}

/* TOUCH DEVICES OR SMALL SCREENS: Show only back content */
@media (hover: none), (max-width: 1024px) {
    .world-card {
        height: auto !important;
        min-height: 200px;
    }

    .card-inner {
        transform: none !important;
        transition: none;
        height: auto;
    }

    /* Hide front side */
    .card-front {
        display: none !important;
    }

    /* Show only back side */
    .card-back {
        position: relative !important;
        transform: none !important;
        backface-visibility: visible;
        padding: 2.25rem 2rem;
        background: var(--white);
        border: 3px solid var(--accent-primary);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

    .world-card:active .card-back {
        transform: scale(0.97) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }

    .card-back-emoji {
        font-size: 3.5rem;
        margin-bottom: 1rem;
        animation: none;
    }

    .card-back .avatar-image {
        animation: none;
        width: 70px;
        height: 70px;
        border: 1px solid var(--accent-primary);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        margin-bottom: 1rem;
    }

    .card-back h3 {
        color: var(--text-primary);
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        font-weight: 700;
    }

    .card-back p {
        color: var(--text-secondary);
        font-size: 1rem;
        line-height: 1.6;
        opacity: 1;
    }
}

/* Large tablets / iPad landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .home-header h1 {
        font-size: 3.5rem;
    }

    .worlds-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }

    .world-card {
        height: 230px;
    }
}

/* Tablets / iPad portrait */
@media (max-width: 768px) {
    .home-header h1 {
        font-size: 3rem;
    }

    .worlds-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem 0;
        margin-bottom: 2rem;
    }

    .world-card {
        height: 220px;
    }

    .card-front,
    .card-back {
        padding: 1.5rem;
    }
}

/* Phones */
@media (max-width: 576px) {
    .home-header {
        margin-bottom: 0.75rem;
    }

    .home-header h1 {
        font-size: 2.25rem;
        margin-bottom: 0.25rem;
    }

    .tagline {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .avatar-image {
        width: 55px;
        height: 55px;
        margin-bottom: 0.5rem;
    }

    .social-links {
        gap: 1rem;
        margin-top: 1rem;
    }

    .social-links a {
        width: 40px;
        height: 40px;
    }

    .worlds-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0;
        margin-bottom: 1.5rem;
    }

    .world-card {
        height: 200px;
    }

    .card-front,
    .card-back {
        padding: 1.25rem;
    }

    .card-icon {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .card-front h2 {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    .card-back h3 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }

    .card-back p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .card-back-emoji {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .card-back .avatar-image {
        width: 45px;
        height: 45px;
    }
}

/* Very small phones */
@media (max-width: 400px) {
    .home-header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .avatar-image {
        width: 50px;
        height: 50px;
    }

    .social-links a {
        width: 38px;
        height: 38px;
    }

    .world-card {
        height: 180px;
    }

    .card-front,
    .card-back {
        padding: 1rem;
    }

    .card-icon {
        font-size: 2.25rem;
    }

    .card-front h2 {
        font-size: 1.1rem;
    }

    .card-back h3 {
        font-size: 1.2rem;
    }

    .card-back p {
        font-size: 0.9rem;
    }
}