/* Game CSS Styles */

/* ── Base Reset ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: linear-gradient(180deg, #8ACED7 0%, #E2E5C2 63%, #EAE7C0 100%);
    touch-action: none;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
}

#gameCanvas {
    display: block;
    cursor: crosshair;
    position: fixed;
    top: 0;
    left: 0;
}

/* ── Rotation & Mobile Warnings ── */
.rotation-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-align: center;
    z-index: 10001;
    flex-direction: column;
}

.rotation-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: rotate 2s infinite linear;
}

.mobile-only {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-align: center;
    z-index: 10000;
}

/* ── Animations ── */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ── Overlay Base (shared by success, error, eligibility, form overlays) ── */
.overlay-base {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: 'AlmoniTzarAAA-Bold', Arial, sans-serif;
}

.overlay-dark {
    background: rgba(0, 0, 0, 0.8);
}

.overlay-gradient {
    background: transparent linear-gradient(180deg, #8ACED7 0%, #E2E5C2 63%, #EAE7C0 100%) 0% 0% no-repeat padding-box;
}

/* ── Message Containers ── */
.message-container {
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 80%;
    animation: slideIn 0.3s ease-out;
}

.message-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.message-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.message-eligibility {
    background: linear-gradient(135deg, #ff4757, #c44569);
    color: white;
}

.message-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.message-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: white;
}

.message-text {
    font-size: 20px;
    margin-bottom: 10px;
}

.message-score {
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: bold;
}

/* ── Overlay Buttons ── */
.btn-overlay {
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-overlay-success {
    background: white;
    color: #4CAF50;
}

.btn-overlay-error {
    background: white;
    color: #f44336;
}

/* ── Player Form Overlay ── */
.form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent linear-gradient(180deg, #8ACED7 0%, #E2E5C2 63%, #EAE7C0 100%) 0% 0% no-repeat padding-box;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: 'AlmoniTzarAAA-Bold', Arial, sans-serif;
}

.form-container {
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: slideIn 0.5s ease-out;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    text-align: right;
    direction: rtl;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.95);
}

.btn-game {
    max-width: 255px;
    width: 80vw;
    height: 56px;
    background-color: #FF0262;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
    font-size: 36px;
    color: white;
    font-family: AlmoniTzarAAA;
    border: 2px solid white;
    border-radius: 45px;
    padding: 14px 10px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Game End Dialog Overlay */
.game-end-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
        background: transparent linear-gradient(180deg, #8ACED7 0%, #E2E5C2 63%, #EAE7C0 100%) 0% 0% no-repeat padding-box;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: 'AlmoniTzarMLv5AAA-Regular';
}

/* Game End Dialog Container */
.game-end-dialog {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    animation: slideIn 0.5s ease-out;
}

/* Game Icon */
.game-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

/* Dialog Title */
.dialog-title {
    color: white;
    margin-bottom: 20px;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Score Display Container */
.score-display {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Score Grid */
.score-grid {
    display: flex;
    justify-content: center;
    text-align: center;
    direction: rtl;
}

/* Score Box */
.score-box {
    background: rgba(255,215,0,0.2);
    padding: 10px;
    border-radius: 8px;
}

/* Score Label */
.score-label {
    color: #FFD700;
    font-size: 14px;
    font-weight: bold;
}

/* Score Value */
.score-value {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

/* Dialog Description */
.dialog-description {
    color: rgba(255,255,255,0.9);
    margin-bottom: 25px;
    font-size: 16px;
}

/* Button Container */
.button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Save Result Button */
.save-result-btn {
    padding: 14px 20px;
    border: 2px solid #FFFFFF;
    border-radius: 45px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #FF0262 0% 0% no-repeat padding-box;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 3px 6px #00000029;
    min-width: 140px;
    opacity: 1;
}

.save-result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0px 5px 10px #00000040;
}

/* Go Home Button */
.go-home-btn {
    padding: 14px 20px;
    border: 2px solid #FFFFFF;
    border-radius: 45px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #FF0262 0% 0% no-repeat padding-box;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0px 3px 6px #00000029;
    min-width: 140px;
    opacity: 1;
}

.go-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0px 5px 10px #00000040;
}

/* Success Overlay */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: 'AlmoniTzarMLv5AAA-Regular';
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.success-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.success-title {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.success-description {
    margin: 0;
    font-size: 16px;
}

/* Known User Message Overlay */
.known-user-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(0, 0, 0, 0.9); */
        background: transparent linear-gradient(180deg, #8ACED7 0%, #E2E5C2 63%, #EAE7C0 100%) 0% 0% no-repeat padding-box;

    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: 'AlmoniTzarMLv5AAA-Regular';
}

/* Known User Message Container */
.known-user-message {
    /* background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); */
    padding: 40px;
    /* border-radius: 20px; */
    /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); */
    max-width: 450px;
    width: 90%;
    text-align: center;
    /* border: 2px solid rgba(255, 255, 255, 0.2); */
    position: relative;
    animation: slideIn 0.5s ease-out;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .game-end-dialog,
    .known-user-message {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .dialog-title {
        font-size: 20px;
    }
    
    .game-icon {
        font-size: 50px;
    }
    
    .save-result-btn,
    .go-home-btn {
        font-size: 14px;
        padding: 12px 16px;
        min-width: 120px;
        border: 2px solid #FFFFFF;
        border-radius: 45px;
        background: #FF0262 0% 0% no-repeat padding-box;
        box-shadow: 0px 3px 6px #00000029;
        opacity: 1;
    }
    
    .button-container {
        flex-direction: column;
        align-items: center;
    }
    
    .score-grid {
        display: flex;
        justify-content: center;
    }
}
.ac-img-responsive{
    width:100%;
    height: auto;
    display: block
}
svg {
    width:100%;
    height: 100%;
}
#ac-bg-all-contents{
  position: fixed;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  top: 0;
    left: 0;
}
#ac-bg-all-contents .ac-clouds, #ac-bg-all-contents .ac-mountains_back, #ac-bg-all-contents .ac-mountains_front, #ac-bg-all-contents .ac-cards, #ac-bg-all-contents .ac-plain {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
}
#ac-bg-all-contents .ac-clouds {
  top: 2rem;
    width: 406vw;
    height: auto;
    left: -3vw;
}
#ac-bg-all-contents .ac-mountains_front {
        bottom: -1vw;
    width: 145vw;
    height: auto;
    right: -4vw;
}
#ac-bg-all-contents .ac-mountains_back {
        bottom: 10vw;
    width: 188vw;
    height: auto;
    left: -43vw;
}
#ac-bg-all-contents .ac-cards {
            bottom: -1vw;
    width: 73vw;
    height: auto;
    left: 16vw;
}
.ac-logo{
     display: flex;
    justify-content: center;
    align-items: center;
    width: 53vw;
    max-width: 200px;
    margin: auto;
    margin-top: -28vw;
    position: relative;
}
.ac-text-2{
    color: #192653;
    font-size: 25px;
    line-height: 1;
    font-weight: 100;
    margin-bottom: 30px;
    display: block;
    position: relative;
    font-family: "AlmoniTzarAAA";
}
.ac-text-2 .ac-red{
    color: #FF0262;
}
.ac-text-2 strong{
    font-weight: 900;
    font-family: 'AlmoniTzarAAA-Bold', Arial, sans-serif;
    display: block;
    margin: 3vw auto -3vw;
    font-size: 48px;
}
.ac-text-3{
    display: block
}