@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap');

/* ==================== A BÖNGÉSZŐ TÁJÉKOZTATÁSA ==================== */
/* Jelezzük a mobilnak, hogy felkészültünk a sötét módra is */
:root {
    color-scheme: light dark;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== ALAP (VILÁGOS) STÍLUSOK ==================== */
body {
    font-family: 'Patrick Hand', cursive, sans-serif;
    background-color: #faf7ef !important;
    color: #333 !important;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Lebegő dekorációk */
.decor {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    user-select: none;
}

.moon { top: 15px; left: 3%; width: 90px; }
.sun { top: 15px; right: 3%; width: 110px; }
.cloud-1 { top: 140px; left: 6%; width: 130px; opacity: 0.85; }
.cloud-2 { top: 110px; right: 8%; width: 120px; opacity: 0.85; }
.star-1 { top: 260px; left: 12%; width: 32px; }
.star-2 { top: 200px; right: 28%; width: 28px; }
.star-3 { top: 80px; left: 35%; width: 22px; }

/* Fő tároló */
.container {
    width: 92%;
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 0.5rem;
    position: relative;
    z-index: 5;
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    letter-spacing: 3px;
    font-weight: bold;
}

/* Címsor színei */
.red { color: #e74c3c !important; }
.blue { color: #3498db !important; }
.green { color: #2ecc71 !important; }
.orange { color: #f39c12 !important; }

/* Menüsor */
.menu {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: -1.2rem;
    position: relative;
    z-index: 10;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    
    color: #2c3e50 !important;
    background-color: #ffffff !important;
    
    width: 115px;
    height: 95px;
    border-radius: 18px 18px 8px 8px;
    border: 3px solid #333;
    font-size: 1.15rem;
    font-weight: bold;
    box-shadow: 0 4px 0 rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-item svg {
    width: 38px;
    height: 38px;
    margin-bottom: 4px;
}

.menu-item:hover {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow: 0 8px 0 rgba(0,0,0,0.15);
}

.menu-item.active {
    transform: translateY(3px);
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.2);
    border-color: #000;
}

/* Színes gombok */
.blue-bg { background-color: #bce4fa !important; }
.yellow-bg { background-color: #fef08a !important; }
.green-bg { background-color: #bbf7d0 !important; }
.orange-bg { background-color: #fed7aa !important; }

/* Fő fehér papírlap */
.content-board {
    background-color: #ffffff !important;
    border: 4px solid #ddcdb4;
    border-radius: 14px;
    padding: 3.5rem 2rem 2.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    text-align: center;
    position: relative;
    z-index: 6;
}

.page-title {
    font-size: 2.2rem;
    color: #2c3e50 !important;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

/* ==================== KERETEK ÉS KÉPEK ==================== */
.featured-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.featured-frame {
    position: relative;
    width: 100%;
    max-width: 250px;
    aspect-ratio: 500 / 380; 
}

.featured-frame.tilt-left { transform: rotate(-3deg); }
.featured-frame.tilt-right { transform: rotate(3deg); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.artwork-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.25s ease;
}

.artwork-card:hover {
    transform: scale(1.04) rotate(-1deg);
}

.frame-box {
    position: relative;
    width: 100%;
    aspect-ratio: 500 / 380;
}

.featured-frame .frame-bg,
.frame-box .frame-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.featured-frame .art-img,
.frame-box .art-picture {
    position: absolute;
    top: 15%;
    left: 13%;
    width: 74%;
    height: 70%;
    object-fit: contain;
    z-index: 1;
    background-color: transparent !important;
}

.artwork-title {
    margin-top: 12px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #444 !important;
}

/* ==================== RÓLAM OLDAL ==================== */
.about-grid {
    display: flex;
    gap: 2rem;
    align-items: center;
    text-align: left;
    margin-top: 1rem;
}

.about-photo {
    flex: 0 0 220px;
    text-align: center;
}

.about-photo img {
    width: 190px;
    height: auto;
    filter: drop-shadow(0 6px 8px rgba(0,0,0,0.1));
}

.about-text {
    flex: 1;
    font-size: 1.4rem;
    line-height: 1.7;
    color: #333 !important;
}

.about-badges {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.badge {
    background-color: #fef08a !important;
    border: 2px dashed #444;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 1.1rem;
    color: #333 !important;
}

/* ==================== ÍRJ NEKEM (PERGAMEN LAP) ==================== */
.parchment {
    max-width: 620px;
    margin: 0 auto;
    background-color: #fffdf5 !important;
    border: 3px solid #d4be98;
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    box-shadow: 2px 8px 20px rgba(0,0,0,0.08);
    padding: 2.5rem 2rem;
    position: relative;
}

.thumbtack {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background-color: #e74c3c !important;
    border-radius: 50%;
    box-shadow: inset -2px -2px 0 rgba(0,0,0,0.3), 0 3px 5px rgba(0,0,0,0.3);
    border: 2px solid #900;
}

.crayon-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: left;
    margin-top: 1rem;
}

.form-group label {
    font-size: 1.3rem;
    font-weight: bold;
    color: #5c4327 !important;
    display: block;
    margin-bottom: 4px;
}

.crayon-input, .crayon-textarea {
    width: 100%;
    font-family: 'Patrick Hand', cursive;
    font-size: 1.3rem;
    padding: 10px 14px;
    border: 2.5px solid #bd9b70;
    border-radius: 12px 6px 14px 8px;
    background-color: #ffffff !important;
    color: #333 !important;
    outline: none;
    transition: border-color 0.2s;
}

.crayon-input:focus, .crayon-textarea:focus {
    border-color: #e67e22;
    box-shadow: 0 0 6px rgba(230, 126, 34, 0.4);
}

.crayon-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 30px;
    background: repeating-linear-gradient(transparent, transparent 28px, #f1e6d4 29px, #f1e6d4 30px) !important;
}

.send-btn {
    align-self: center;
    background-color: #2ecc71 !important;
    color: #fff !important;
    font-family: 'Patrick Hand', cursive;
    font-size: 1.6rem;
    font-weight: bold;
    padding: 10px 30px;
    border: 3px solid #27ae60;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 5px 0 #219653;
    transition: transform 0.1s, box-shadow 0.1s;
    margin-top: 0.5rem;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #219653;
}

.send-btn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #219653;
}

/* Egyedi fájlfeltöltő gomb */
.hidden-file-input {
    display: none;
}

.custom-file-btn {
    display: inline-block;
    background-color: #ffffff !important;
    color: #5c4327 !important;
    border: 2.5px dashed #bd9b70;
    border-radius: 12px 6px 14px 8px;
    padding: 12px 20px;
    font-family: 'Patrick Hand', cursive;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.custom-file-btn:hover {
    border-color: #e67e22;
    color: #d35400 !important;
}

.file-name-display {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.1rem;
    color: #7f6448 !important;
    margin-top: 6px;
    text-align: center;
}

/* Karakterek az alsó sávban */
.characters-bar {
    position: relative;
    max-width: 960px;
    width: 90%;
    margin: 0 auto;
    height: 130px;
    pointer-events: none;
}

.char {
    position: absolute;
    bottom: 0;
}

.girl { left: 8%; width: 75px; }
.boy { left: 19%; width: 85px; }
.dog { right: 10%; width: 95px; mix-blend-mode: multiply; }

/* Lábléc */
footer {
    text-align: center;
    padding: 1rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: #555 !important;
    z-index: 10;
}

/* ==================== MOBIL ÉS TABLET RESZPONZIVITÁS ==================== */
@media (max-width: 820px) {
    .menu {
        display: grid;
        grid-template-columns: repeat(2, 140px);
        gap: 0.8rem;
        margin-bottom: 1rem;
    }
    .menu-item {
        width: 100%;
        height: 75px;
    }
    
    /* === JAVÍTÁS: Rólam oldal hatalmas űr megszüntetése === */
    .about-grid {
        flex-direction: column !important;
        text-align: center !important;
        gap: 0 !important; 
    }
    .about-photo {
        flex: none !important; /* Felülírja a 220px-es dobozt! */
        height: auto !important;
        margin-bottom: 15px !important;
    }
    .about-photo img {
        height: auto !important;
    }
    /* ======================================================= */

    .about-badges {
        justify-content: center;
    }
    .decor.cloud-1, .decor.cloud-2 {
        opacity: 0.4;
    }
}

@media (max-width: 580px) {
    .menu {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        gap: 0.5rem;
    }
    .moon { width: 60px; left: 1%; top: 10px; }
    .sun { width: 75px; right: 1%; top: 10px; }
    .characters-bar {
        height: 90px;
    }
    .girl { width: 50px; left: 4%; }
    .boy { width: 55px; left: 18%; }
    .dog { width: 65px; right: 4%; }
    .content-board {
        padding: 2rem 1rem 1.5rem;
    }
}

/* ==================== "KAMU" DARK MODE ==================== */
/* Ha a böngésző sötét módot eröltet, mi visszaadjuk neki az eredeti világos színeket! */
@media (prefers-color-scheme: dark) {
    body { background-color: #faf7ef !important; color: #333 !important; }
    .content-board { background-color: #ffffff !important; }
    .menu-item { background-color: #ffffff !important; color: #2c3e50 !important; }
    .blue-bg { background-color: #bce4fa !important; }
    .yellow-bg { background-color: #fef08a !important; }
    .green-bg { background-color: #bbf7d0 !important; }
    .orange-bg { background-color: #fed7aa !important; }
    
    .red { color: #e74c3c !important; }
    .blue { color: #3498db !important; }
    .green { color: #2ecc71 !important; }
    .orange { color: #f39c12 !important; }
    
    .page-title { color: #2c3e50 !important; }
    .artwork-title { color: #444 !important; }
    .about-text { color: #333 !important; }
    .badge { background-color: #fef08a !important; color: #333 !important; }
    
    .parchment { background-color: #fffdf5 !important; }
    .thumbtack { background-color: #e74c3c !important; }
    .form-group label { color: #5c4327 !important; }
    
    .crayon-input, .crayon-textarea { background-color: #ffffff !important; color: #333 !important; }
    .custom-file-btn { background-color: #ffffff !important; color: #5c4327 !important; }
    .file-name-display { color: #7f6448 !important; }
    .send-btn { background-color: #2ecc71 !important; color: #ffffff !important; }
    
    footer { color: #555 !important; }
}