/* PirataOne betűtípus helyi TTF fájlból */
@font-face {
    font-family: 'PirataOne';
    src: url('assets/font/PirataOne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Gyorsabb betöltés - swap a rendereléshez */
}

/* Charmonman Bold betűtípus helyi TTF fájlból */
@font-face {
    font-family: 'Charmonman';
    src: url('assets/font/Charmonman-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* FrankRuhlLibre Regular betűtípus helyi TTF fájlból */
@font-face {
    font-family: 'FrankRuhlLibre-Regular';
    src: url('assets/font/FrankRuhlLibre-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Courgette betűtípus helyi TTF fájlból */
@font-face {
    font-family: 'Courgette';
    src: url('assets/font/Courgette-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.87);
    background-color: #000000;
    font-family: 'PirataOne', Arial, sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed; /* Megakadályozza a scroll-t */
    overscroll-behavior: none; /* Letiltja a swipe-back/forward navigációt */
    touch-action: none; /* Letiltja a böngésző alapértelmezett touch gesztusait (pl. lapozás) */
}

#app {
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height — mobilon a valóban látható terület */
    height: calc(var(--vh, 1vh) * 100); /* JS felülírja ha --vh be van állítva */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
}

/* Asztal háttér - mindig kitölti a teljes képernyőt (cover) */
#game-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}
#game-bg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
#game-bg img.bg-hidden {
    display: none;
}

/* Játék konténer - a ResponsiveViewport állítja a méretet (responsive/fix mód) */
#game-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
    background-color: transparent; /* Az asztal háttér (#game-bg) látszik át */
}

/* Fallback ha --vh nincs beállítva */
@supports not (height: calc(var(--vh) * 100)) {
    #app {
        height: 100dvh; /* Dynamic viewport height - modern böngészők */
    }
}


/* ========================================
   Google Login Modal Overlay
   ======================================== */

.google-overlay {
    display: none; /* Alapértelmezetten rejtve */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('assets/asztal0.jpg'); /* Portré mód - asztal0 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10000; /* A játék canvas fölé */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

/* Landscape mód - asztal90 */
@media screen and (orientation: landscape) {
    .google-overlay {
        background-image: url('assets/asztal90.jpg');
    }
}

.google-overlay.active {
    display: flex; /* Megjelenítés amikor aktív */
}

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

.google-modal {
    background: #000000a0; /* Átlátszó fekete háttér */
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
    position: relative;
}

/* X bezáró gomb */
.close-login-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
    border-radius: 50%;
}

.close-login-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.close-login-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

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

.google-modal-content {
    text-align: center;
    color: white;
}

.google-modal-content h2 {
    font-family: 'PirataOne', Arial, sans-serif;
    font-size: 32px;
    margin: 0 0 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.google-modal-content p {
    font-family: 'Courgette', cursive;
    font-size: 26px;
    line-height: 1.6;
    margin: 0 0 30px 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Egyedi Google bejelentkezés gomb */
.custom-google-btn {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(180deg, #e8d4b0 0%, #d4a574 50%, #c89f6b 100%);
    color: #3d2817;
    border: 2px solid #8b6f47;
    border-radius: 12px;
    padding: 12px 24px;
    font-family: 'Courgette', cursive;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
    box-sizing: border-box;
}

.custom-google-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 25%, 
        transparent 50%, 
        rgba(0, 0, 0, 0.05) 75%, 
        transparent 100%);
    border-radius: 12px;
    pointer-events: none;
}

.custom-google-btn:hover {
    background: linear-gradient(180deg, #f0dfc0 0%, #e0b888 50%, #d4a574 100%);
    border-color: #9d7a55;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.custom-google-btn:active {
    background: linear-gradient(180deg, #d4a574 0%, #c89f6b 50%, #b8945f 100%);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.google-icon {
    height: 40px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin: 0 8px;
}

.google-btn-text {
    white-space: nowrap;
}

/* "Folytatás bejelentkezés nélkül" gomb */
.skip-btn {
    background: linear-gradient(180deg, #e8d4b0 0%, #d4a574 50%, #c89f6b 100%);
    color: #3d2817;
    border: 2px solid #8b6f47;
    border-radius: 12px;
    padding: 20px 24px;
    font-family: 'Courgette', cursive;
    font-size: 22px;
    font-weight: normal;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    box-sizing: border-box;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 25%, 
        transparent 50%, 
        rgba(0, 0, 0, 0.05) 75%, 
        transparent 100%);
    border-radius: 12px;
    pointer-events: none;
}

.skip-btn:hover {
    background: linear-gradient(180deg, #f0dfc0 0%, #e0b888 50%, #d4a574 100%);
    border-color: #9d7a55;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.skip-btn:active {
    background: linear-gradient(180deg, #d4a574 0%, #c89f6b 50%, #b8945f 100%);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Belépés/Regisztráció választógombok */
.login-mode-toggle {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

.mode-toggle-btn {
    background: rgba(212, 165, 116, 0.3);
    color: #d4a574;
    border: 2px solid #d4a574;
    border-radius: 10px;
    padding: 10px 24px;
    font-family: 'Courgette', cursive;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-toggle-btn.active {
    background: linear-gradient(180deg, #e8d4b0 0%, #d4a574 50%, #c89f6b 100%);
    color: #3d2817;
    border-color: #8b6f47;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.mode-toggle-btn:hover {
    background: rgba(212, 165, 116, 0.5);
    transform: translateY(-1px);
}

.mode-toggle-btn.active:hover {
    background: linear-gradient(180deg, #f0dfc0 0%, #e0b888 50%, #d4a574 100%);
}

/* Email-jelszó bejelentkezési form */
.email-login-form {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background-color: #131212;
    border: 2px solid #d4a574;
    border-radius: 12px;
    font-family: 'Courgette', cursive;
    font-size: 18px;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: #8b6f47;
    opacity: 0.7;
}

.form-input:focus {
    border-color: #9d7a55;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.form-input.error {
    border-color: #ff4444;
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.2);
}

.password-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.password-input-wrapper .form-input {
    flex: 1;
}

.login-submit-btn {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(180deg, #e8d4b0 0%, #d4a574 50%, #c89f6b 100%);
    color: #3d2817;
    border: 2px solid #8b6f47;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.login-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 25%, 
        transparent 50%, 
        rgba(0, 0, 0, 0.05) 75%, 
        transparent 100%);
    border-radius: 12px;
    pointer-events: none;
}

.login-submit-btn svg {
    width: 20px;
    height: 20px;
    stroke: #3d2817;
}

.login-submit-btn:hover {
    background: linear-gradient(180deg, #f0dfc0 0%, #e0b888 50%, #d4a574 100%);
    border-color: #9d7a55;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.login-submit-btn:active {
    background: linear-gradient(180deg, #d4a574 0%, #c89f6b 50%, #b8945f 100%);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Email bejelentkezési form konténer */
.email-login-form-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-step {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Newsletter checkbox */
.newsletter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Courgette', cursive;
    font-size: 16px;
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    background: rgba(212, 165, 116, 0.1);
    border-radius: 10px;
}

.newsletter-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #d4a574;
}

.newsletter-checkbox-label:hover {
    background: rgba(212, 165, 116, 0.2);
}

/* Jelszó választó (regisztrációnál) - régi, törölhető */
.password-choice {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: rgba(212, 165, 116, 0.1);
    border-radius: 10px;
}

.password-choice-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Courgette', cursive;
    font-size: 16px;
    color: #ffffff;
    cursor: pointer;
}

.password-choice-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.password-choice-label:hover {
    color: #e8d4b0;
}

/* ========================================
   Visszajelzés / Feedback form
   ======================================== */

.feedback-content p {
    font-family: 'Courgette', cursive;
    font-size: 22px;
    line-height: 1.5;
    margin: 0 0 15px 0;
    color: rgba(255, 255, 255, 0.9);
}

.feedback-content .feedback-email-label {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 20px;
}

.feedback-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.4;
}

.feedback-disclaimer {
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.55) !important;
    margin: 5px 0 10px 0 !important;
    font-style: italic;
}

.feedback-content .skip-btn {
    margin-top: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: auto;
}

.feedback-content .form-input:disabled,
.feedback-content .skip-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobil responsive */
@media (max-width: 600px) {
    .google-modal {
        padding: 30px 20px;
        max-width: 85%;
    }
    
    .google-modal-content h2 {
        font-size: 26px;
    }
    
    .google-modal-content p {
        font-size: 16px;
    }
}

/* ========================================
   Landscape figyelmeztető overlay (mobilon)
   ======================================== */

#landscape-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: url('assets/asztal90.jpg') center/cover no-repeat #1a0e05;
    justify-content: center;
    align-items: center;
}

#landscape-overlay.active {
    display: flex;
}

.landscape-overlay-content {
    text-align: center;
    padding: 40px 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #8b6f47;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(139, 111, 71, 0.15);
    max-width: 80%;
}

.landscape-overlay-content .rotate-icon {
    font-size: 72px;
    line-height: 1;
    margin-bottom: 20px;
    display: inline-block;
    animation: rotatePhone 2s ease-in-out infinite;
}

.landscape-overlay-content p {
    font-family: 'Charmonman', cursive;
    font-size: 22px;
    color: #e8d4b0;
    margin: 0;
    line-height: 1.5;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.landscape-overlay-content p strong {
    color: #ffffff;
    font-size: 26px;
}

@keyframes rotatePhone {
    0%, 100% { transform: rotate(90deg); }
    40%, 60% { transform: rotate(0deg); }
}
