@font-face {
    font-family: 'CustomFont';
    src: url('../assets/font.ttf') format('truetype');
}

body {
    margin: 0;
    font-family: 'CustomFont', Arial, sans-serif;
    font-size: 1.3rem !important;
    font-weight: bold;
    background: #fff0f5;
    text-align: center;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* IMAGE MODAL */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal .modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: -30px;
    right: 0;
    font-size: 36px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #ffb6c1;
}

/* HOME PAGE */
.board {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.home-content {
    position: relative;
    z-index: 2;
}

.homeNavs {
    border-radius: 30px;
    background-color: rgba(152, 152, 152, 0.2);
    padding: 30px 20px;
    max-width: 100%;
}

@media (min-width: 768px) {
    .homeNavs {
        padding: 30px 40px;
        max-width: 500px;
    }
}

/* BUTTONS */
.btn-custom {
    padding: 12px 22px !important;
    margin: 10px 5px !important;
    border: none !important;
    border-radius: 12px !important;
    background: #ffb6c1 !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.btn-custom:hover {
    background: #ff69b4 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* BACKGROUND DECORATIONS */
.bg-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.board .bg {
    position: absolute;
    width: 80px;
    background: white;
    padding: 4px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    z-index: 0;
}

@media (max-width: 768px) {
    .board .bg {
        width: 50px;
        padding: 2px;
    }
    
    /* Reposition images to edges on mobile to avoid center overlap */
    .b1 { top: 2%; left: 5%; }
    .b2 { top: 8%; right: 5%; left: auto; }
    .b3 { top: 18%; left: 2%; }
    .b4 { top: 25%; right: 3%; left: auto; }
    .b5 { top: 40%; left: 3%; }
    .b6 { top: 45%; right: 20%; left: auto; }
    .b7 { bottom: 35%; left: 2%; top: auto; }
    .b8 { bottom: 30%; right: 3%; left: auto; top: auto; }
    .b9 { bottom: 20%; left: 8%; top: auto; }
    .b10 { bottom: 15%; right: 8%; left: auto; top: auto; }
    .b11 { bottom: 10%; left: 4%; top: auto; }
    .b12 { bottom: 5%; right: 5%; left: auto; top: auto; }
    .b13 { top: 50%; right: 70%; left: auto; }
    .b14 { bottom: 3%; left: 3%; top: auto; }
}

.b1 { top: 5%; left: 10%; transform: rotate(-10deg); }
.b2 { top: 15%; left: 70%; transform: rotate(8deg); }
.b3 { top: 25%; left: 20%; transform: rotate(-5deg); }
.b4 { top: 35%; left: 80%; transform: rotate(10deg); }
.b5 { top: 95%; left: 15%; transform: rotate(-8deg); }
.b6 { top: 55%; left: 85%; transform: rotate(6deg); }
.b7 { top: 65%; left: 5%; transform: rotate(-12deg); }
.b8 { top: 75%; left: 75%; transform: rotate(9deg); }
.b9 { top: 20%; left: 50%; transform: rotate(-6deg); }
.b10 { top: 40%; left: 3%; transform: rotate(7deg); }
.b11 { top: 70%; left: 30%; transform: rotate(-9deg); }
.b12 { top: 70%; left: 55%; transform: rotate(11deg); }
.b13 { top: 30%; left: 85%; transform: rotate(-4deg); }
.b14 { top: 80%; left: 10%; transform: rotate(8deg); }

/* MAIN IMAGE */
#drawing {
    width: 130px;
    animation: float 3s infinite;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    #drawing {
        width: 100px;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* PAGE CONTAINERS */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

h1, h2, p {
    position: relative;
    z-index: 2;
    color: #333;
}

h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.5rem;
    }
}

/* ICONS */
.icon {
    width: 90px;
    max-width: 100%;
    height: auto;
    margin: 15px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.icon:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .icon {
        width: 70px;
    }
}

/* GALLERY - RESPONSIVE */
.gallery-grid {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gallery-item {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.gallery-video {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    max-width: 300px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    grid-column: 1 / -1;
    justify-self: center;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
        gap: 10px;
        padding: 15px;
    }
    
    .gallery-video {
        max-width: 100%;
    }
}

/* LEGACY GALLERY SUPPORT */
.gallery {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 15px;
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.gallery img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
}

.gallery video {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border-radius: 12px;
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    }
}

/* IMAGES RESPONSIVE */
img {
    max-width: 100%;
    height: auto;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

/* SAD PAGE IMAGES */
#sad .row img {
    max-width: 250px;
    width: 100%;
}

@media (max-width: 768px) {
    #sad .row img {
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    #sad .row img {
        max-width: 140px;
    }
}

/* PUZZLE PAGE IMAGES */
#puzzlePage .row img {
    max-width: 190px;
    width: 100%;
}

@media (max-width: 768px) {
    #puzzlePage .row img {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    #puzzlePage .row img {
        max-width: 150px;
    }
}

/* RESPONSIVE VIDEO */
.ratio-16x9 {
    --bs-aspect-ratio: 56.25%;
}