/* swipe-game.css - Editorial Edition */

#game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: var(--font-body);
}

.game-header {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.editorial-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    width: 100%;
    z-index: 2001;
}

.editorial-progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.3s ease;
}

.game-card-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    height: 70vh;
    max-height: 800px;
}

.swipe-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    border-radius: 4px; /* Minimalist */
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    overflow: hidden;
    transform-origin: 50% 100%;
    will-change: transform, opacity;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.swipe-card.dragging {
    transition: none;
    cursor: grabbing;
}

.swipe-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    transition: filter 0.1s; /* smooth grayscale/brightness transition */
}

.swipe-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Removed the tilt */
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 4px;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(0,0,0,0.8), 2px 2px 4px rgba(0,0,0,1);
    z-index: 5;
    color: #fff;
    white-space: nowrap;
}

/* Animations for throwing */
.throw-left {
    transform: translateX(-100%) translateY(20%) rotate(-10deg) !important;
    opacity: 0 !important;
    transition: transform 0.5s ease-in, opacity 0.3s ease-in !important;
}

.throw-right {
    transform: translateX(100%) translateY(20%) rotate(10deg) !important;
    opacity: 0 !important;
    transition: transform 0.5s ease-in, opacity 0.3s ease-in !important;
}

.editorial-hints {
    position: absolute;
    bottom: 120px;
    width: 90%;
    max-width: 500px;
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 5;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.editorial-hints.hidden {
    opacity: 0;
}

.game-footer {
    position: absolute;
    bottom: 40px;
    display: flex;
    gap: 30px;
    z-index: 10;
    align-items: center;
}

.skip-game-btn {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    color: #888;
    padding: 5px 0;
    border-radius: 0;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s, border-color 0.3s;
}

.skip-game-btn:hover {
    color: #fff;
    border-color: #fff;
}

.undo-btn {
    background: transparent;
    border: 1px solid #444;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, border-color 0.3s;
}
.undo-btn:hover {
    transform: scale(1.1);
    border-color: #fff;
}

.end-game-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.end-game-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 15px 40px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
}

.end-game-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

/* Match Overlays (Cinematic) */
.flash-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 2900;
    transition: opacity 0.15s ease-out;
}
.flash-overlay.show {
    opacity: 0.8;
}

.match-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 8px;
    color: #000;
    background: rgba(255,255,255,0.9);
    padding: 2px 20px;
    opacity: 0;
    z-index: 3000;
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
    transition: opacity 1s, transform 2s ease-out;
}

.match-popup.show {
    animation: editorial-match 2s forwards;
}

@keyframes editorial-match {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

/* Intro Cinematic */
.intro-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #050505;
    z-index: 3500;
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity 1.5s ease-in-out;
}

.intro-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.intro-overlay h2 {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 4px;
    opacity: 0;
    animation: fade-in-up 2.5s ease-out forwards;
}

@keyframes fade-in-up {
    0% { opacity: 0; transform: translateY(10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(-5px); }
}

/* Color Swipe Feedback */
.color-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: transparent;
    z-index: 2;
    pointer-events: none;
    transition: background 0.1s;
}
