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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #F5F5F5 0%, #FAFAFA 100%);
    color: #2D2D2D;
    overflow: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/background-(Compressify.io).webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: 0;
}

/* Decorative Elements */
.decoration {
    position: absolute;
    font-size: 2rem;
    opacity: 0;
    animation: fadeInDecor 1s ease-in forwards;
    pointer-events: none;
    z-index: 1;
}

.decoration::before {
    content: '@';
    color: #FF6B35;
    font-weight: bold;
}

.decoration-1 { top: 10%; left: 8%; animation-delay: 0.2s; }
.decoration-2 { top: 15%; right: 10%; animation-delay: 0.4s; }
.decoration-3 { top: 70%; left: 5%; animation-delay: 0.6s; }
.decoration-4 { top: 75%; right: 8%; animation-delay: 0.8s; }
.decoration-5 { top: 40%; left: 3%; animation-delay: 1s; }
.decoration-6 { top: 45%; right: 5%; animation-delay: 1.2s; }
.decoration-7 { bottom: 15%; left: 12%; animation-delay: 1.4s; }
.decoration-8 { bottom: 20%; right: 15%; animation-delay: 1.6s; }

@keyframes fadeInDecor {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 0.3;
        transform: scale(1);
    }
}

/* Main Container */
.container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    min-height: 100vh;
    padding: 4rem 1rem 2rem;
}

/* Header */
.header {
    text-align: center;
    animation: slideInFromTop 0.8s ease-out;
    margin-top: 3rem;
}

.title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #2D2D2D;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #555;
    font-weight: 400;
}

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

/* Boxes Container */
.boxes-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 4vw, 3rem);
    flex-wrap: wrap;
    margin: auto 0;
}

.box-wrapper {
    cursor: pointer;
    animation: scaleIn 0.6s ease-out forwards;
    opacity: 0;
    transform: scale(0.8);
}

.box-wrapper:nth-child(1) { animation-delay: 0.3s; }
.box-wrapper:nth-child(2) { animation-delay: 0.5s; }
.box-wrapper:nth-child(3) { animation-delay: 0.7s; }

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.box {
    width: clamp(150px, 20vw, 250px);
    height: clamp(150px, 20vw, 250px);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

.box-1 {
    background-image: url('assets/box1-(Compressify.io).webp');
}

.box-2 {
    background-image: url('assets/box2-(Compressify.io).webp');
}

.box-3 {
    background-image: url('assets/box2-(Compressify.io)_1.webp');
}

/* Hover Effects */
.box-wrapper:hover .box {
    transform: scale(1.05);
    filter: drop-shadow(0 15px 30px rgba(255, 107, 53, 0.3));
}

.box-wrapper:hover .box-1 {
    background-image: url('assets/box1-hover-(Compressify.io).webp');
}

.box-wrapper:hover .box-2 {
    background-image: url('assets/box2-hover-(Compressify.io).webp');
}

.box-wrapper:hover .box-3 {
    background-image: url('assets/box3-hover-(Compressify.io).webp');
}

/* Active/Click Effect */
.box-wrapper:active .box {
    transform: scale(0.95);
}

/* Footer */
.footer {
    text-align: center;
    animation: fadeIn 1s ease-in 1s forwards;
    opacity: 0;
    margin-top: -2rem;
}

.logo-createit {
    height: clamp(30px, 4vw, 50px);
    width: auto;
}

.footer a {
    display: inline-block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.footer a:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeInBackdrop 0.3s ease;
}

@keyframes fadeInBackdrop {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleInModal 0.4s ease;
    z-index: 1001;
}

@keyframes scaleInModal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
    z-index: 1;
}

.modal-close:hover {
    color: #2D2D2D;
}

.modal-body {
    text-align: center;
}

.animal-image-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.animal-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.animal-name-badge {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 45, 45, 0.9);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: clamp(1rem, 3vw, 1.25rem);
    letter-spacing: 1px;
    display: none; /* Hidden - name not shown to user */
}

.modal-text {
    margin: 2rem 0;
}

.modal-greeting {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: #2D2D2D;
    margin-bottom: 1rem;
}

.modal-description {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    color: #555;
    line-height: 1.6;
    white-space: pre-line;
}

.modal-footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #E5E5E5;
}

.modal-logo {
    height: clamp(30px, 4vw, 40px);
    width: auto;
}

.modal-logo-wwf {
    height: clamp(50px, 7vw, 70px);
}

.modal-ps-text {
    margin-top: 1.5rem;
    text-align: center;
}

.modal-ps-text p {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    color: #777;
    line-height: 1.5;
    font-style: italic;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem 1rem;
        justify-content: space-around;
    }

    .header {
        margin-top: 1rem;
    }

    .title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        margin-bottom: 0.3rem;
    }

    .subtitle {
        font-size: clamp(0.875rem, 3vw, 1.125rem);
    }

    .boxes-container {
        gap: 1rem;
        margin: 1rem 0;
    }

    .box {
        width: clamp(100px, 22vw, 150px);
        height: clamp(100px, 22vw, 150px);
    }

    .footer {
        margin-top: 0.5rem;
    }

    .logo-createit {
        height: clamp(25px, 3vw, 35px);
    }

    .modal-content {
        padding: 1rem;
        max-width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }

    .animal-image {
        max-width: 90%;
    }

    .animal-name-badge {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }

    .modal-text {
        margin: 1rem 0;
    }

    .modal-greeting {
        font-size: clamp(1rem, 4vw, 1.25rem);
        margin-bottom: 0.75rem;
    }

    .modal-description {
        font-size: clamp(0.875rem, 3vw, 1rem);
    }

    .modal-footer-logos {
        flex-direction: row;
        gap: 1.5rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .modal-logo {
        height: clamp(28px, 4vw, 35px);
    }

    .modal-logo-wwf {
        height: clamp(40px, 6vw, 55px);
    }

    .modal-ps-text {
        margin-top: 1rem;
    }

    .modal-ps-text p {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }

    .decoration {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem 0.75rem 0.75rem;
    }

    .header {
        margin-top: 0.5rem;
    }

    .title {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .boxes-container {
        flex-direction: column;
        gap: 0.75rem;
        margin: 0.75rem 0;
    }

    .box {
        width: 140px;
        height: 140px;
    }

    .footer {
        margin-top: 0.5rem;
    }

    .logo-createit {
        height: 28px;
    }

    .modal-content {
        padding: 0.75rem;
        max-height: 92vh;
    }

    .modal-close {
        font-size: 1.5rem;
        top: 0.5rem;
        right: 0.5rem;
    }

    .animal-image {
        max-width: 85%;
    }

    .animal-name-badge {
        padding: 0.3rem 0.75rem;
        font-size: 0.75rem;
        bottom: 0.5rem;
    }

    .modal-text {
        margin: 0.75rem 0;
    }

    .modal-greeting {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .modal-description {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .modal-footer-logos {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        gap: 1rem;
    }

    .modal-logo {
        height: 25px;
    }

    .modal-logo-wwf {
        height: 40px;
    }

    .modal-ps-text {
        margin-top: 0.75rem;
    }

    .modal-ps-text p {
        font-size: 0.65rem;
        line-height: 1.3;
    }

    .decoration {
        font-size: 1.2rem;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1199px) {
    .container {
        padding: 2rem 2rem;
    }

    .boxes-container {
        gap: 2rem;
    }
}

/* Mobile Landscape */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .container {
        padding: 1rem 1rem 0.5rem;
    }

    .header {
        margin-top: 0.5rem;
    }

    .title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .boxes-container {
        gap: 1rem;
        margin: 0.5rem 0;
    }

    .box {
        width: 100px;
        height: 100px;
    }

    .footer {
        margin-top: 0.5rem;
    }

    .modal-content {
        max-height: 90vh;
        padding: 0.75rem;
    }

    .animal-image {
        max-width: 200px;
    }

    .modal-text {
        margin: 0.5rem 0;
    }

    .modal-greeting {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .modal-description {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .modal-footer-logos {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }

    .modal-ps-text {
        margin-top: 0.5rem;
    }

    .modal-ps-text p {
        font-size: 0.65rem;
        line-height: 1.2;
    }
}

/* Ensure no scrolling on desktop */
@media (min-height: 600px) and (min-width: 769px) {
    body {
        height: 100vh;
    }
}

/* Accessibility */
.box-wrapper:focus {
    outline: 3px solid #FF6B35;
    outline-offset: 5px;
    border-radius: 10px;
}

.modal-close:focus {
    outline: 2px solid #FF6B35;
    outline-offset: 2px;
}

/* Loading state (optional) */
.loading {
    pointer-events: none;
    opacity: 0.6;
}
