/* ===========================
   ALAPSTÍLUSOK
=========================== */
body {
    background-image: url(round-icons-1A1cQqgYoP4-unsplash.svg);
    background-repeat: repeat;
    background-size: 100px 100px;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    margin: 0;
    padding: 0;
}

.logo {
  margin-top: 10px;
  height: 75px;
}

.icon {
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: absolute;
  padding-top: 10px;
  right: 20px;
  transition: transform 0.2s;
  margin-top: 12px;
}

.icon:hover {
  transform: scale(1.1);
}

a {
    color: black;
    text-decoration: none;
}

.cim {
    font-size: 40px;
    margin: 20px;
}

/* ===========================
   COOKIE BANNER
=========================== */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background-color: rgba(255, 255, 255, 0.5);
    color: #000;
    padding: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.cookie-banner a {
    color: #D891EF;
    text-decoration: underline;
}

.cookie-banner button {
    background-color: #D891EF;
    border: none;
    padding: 0.5em 1em;
    cursor: pointer;
    font-weight: bold;
    color: white;
    border-radius: 6px;
}

/* ===========================
   ÚJ: AZONOSÍTÁSI OVERLAY
=========================== */
.auth-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(10px);
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.auth-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.auth-box {
    background: rgba(255,255,255,0.15);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    text-align: center;
    color: white;
    width: 300px;
    animation: fadeIn 0.4s ease;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.auth-buttons button {
    padding: 10px;
    border-radius: 10px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    background: #D891EF;
    color: white;
    transition: 0.2s;
}

.auth-buttons button:hover {
    background: #3e2a44;
}

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

#authAnimation {
    width: 180px !important;
    height: 180px !important;
    margin: 0 auto 10px auto;
}


/* ===========================
   ÚJ: PIN MODAL (3.0 verzió)
=========================== */
.pin-modal {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    z-index: 3000;
    color: white;
    padding: 20px;
}

.pin-modal button {
    background: #D891EF;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.pin-modal button:hover {
    background: #3e2a44;
}

.pin-input-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.pin-input-box input {
    font-size: 2rem;
    padding: 10px;
    width: 120px;
    text-align: center;
    border-radius: 10px;
    border: none;
    margin: 0 auto;
}

/* Login panel */

.center-panel {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 300px;
    z-index: 3001;
    display: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.center-panel input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.center-panel button {
    width: 100%;
    padding: 10px;
    background: #D891EF;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.center-panel button:hover {
    background: #3e2a44;
}

/* Galéria rács */
#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 20px;
}

/* Indexképek */
.gallery-img {
    width: 100%;
    aspect-ratio: 1 / 1;      /* 1x1 négyzet */
    object-fit: cover;        /* kitölti a négyzetet */
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-img:hover {
    transform: scale(1.03);
}

#imageOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#imageOverlayInner {
    display: flex;          /* EZ HIÁNYZOTT */
    justify-content: center;
    align-items: center;
    max-width: 80vw;        /* viewport-alapú méretek */
    max-height: 80vh;
}

#imageOverlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;    /* biztosan nem csúszik ki */
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    cursor: zoom-out;
}

#imageToolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(0,0,0,0.75);
    display: none;
    justify-content: center;
    align-items: center;
    gap: 50px;
    z-index: 10000;
    backdrop-filter: blur(6px);
    margin: 20px;
    border-radius: 70px;
}

.toolbar-icon {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.toolbar-icon:hover {
    opacity: 0.7;
}

.toolbar-icon.right {
    width: 20px;
    height: 25px;
}

/* Bal nyíl tükrözése */
.toolbar-icon.left {
    transform: scaleX(-1);
    width: 20px;
    height: 25px;
}

#collageModeOverlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    display: none;

    border: 6px solid transparent;
    border-image: linear-gradient(
        45deg,
        #ff0000,
        #ff7f00,
        #ffff00,
        #00ff00,
        #0000ff,
        #4b0082,
        #9400d3
    ) 1;

    animation: rainbowGlow 3s linear infinite;
}


@keyframes rainbowShift {
    0% {
        border-image-source: linear-gradient(45deg,
            red, orange, yellow, green, blue, indigo, violet);
    }
    100% {
        border-image-source: linear-gradient(405deg,
            red, orange, yellow, green, blue, indigo, violet);
    }
}

#collageModeOverlay {
    animation:
        rainbowGlow 3s ease-in-out infinite,
        rainbowShift 8s linear infinite;
}


.gallery-img.selected-collage {
    outline: 5px solid #D891EF;
    outline-offset: -5px;
    filter: brightness(1.2);
}

#collageToolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    padding: 15px 25px;
    background: rgba(0,0,0,0.75);
    display: none;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(6px);
    margin: 20px;
    border-radius: 20px;
    color: white;
}

.collage-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.collage-text .title {
    font-size: 1.2rem;
    font-weight: bold;
}

.collage-text .subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
}

.collage-icon {
    height: 40px;
}