* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background: #191D29;
    min-height: 100vh;
    color: #191D29;
}

h1 {
    color: #F1DD95;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 80px;
}

.header {
    text-align: center;
    color: #FFFEF2;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.input-section {
    background: #FFFEF2;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #191D29;
}

input[type="text"] {
    width: 100%;
    background: #FBF5D7;
    padding: 12px;
    border: 1px solid #F1DD95;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}


input::placeholder {
  color: #A88A8B;
}

.eyebrow {
    font-weight: 500;
    letter-spacing: 1px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #E89B58;
}

.btn {
    flex-shrink: 0;
    background: linear-gradient(180deg, #602B45 0%, #191D29 100%);
    color: #FFFEF2;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #FFFEF2;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #FFFEF2;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.comparison-section {
    background: #FFFEF2;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-bar {
    background: #FBF5D7;
    height: 6px;
}

.progress-fill {
    background: linear-gradient(180deg, #EDBF79 0%, #E89B58 100%);
    height: 100%;
    transition: width 0.3s ease;
}

.comparison-content {
    padding: 30px;
}

.comparison-header {
    text-align: center;
    margin-bottom: 30px;
}

.comparison-counter {
    color: #191D29;
    font-size: 14px;
    margin-bottom: 10px;
}

.comparison-question {
    font-size: 1.2rem;
    font-weight: 600;
    color: #191D29;
}

.games-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.game-card {
    background: #FBF5D7;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    touch-action: manipulation;
    user-select: none;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #F1DD95;
}

.game-card.selected {
    background: linear-gradient(180deg, #602B45 0%, #191D29 100%);
    color: #FFFEF2;
    transform: scale(1.05);
}

.game-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.skip-btn {
    background: rgba(37, 41, 55, 0.1);
    color: #191D29; 
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.skip-btn:hover {
    background: rgba(37, 41, 55, 0.25);
    transform: translateY(-2px);
}

.results-section {
    background: #FFFEF2;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-title {
    font-size: 2rem;
    color: #191D29;
    margin-bottom: 10px;
}

.ranking-list {
    list-style: none;
}

.ranking-item {
    display: flex;
    align-items: center;
    background: #FBF5D7;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: grab;
}

.ranking-item:hover {
    background: #F1DD95;
    transform: translateX(5px);
}

.ranking-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.rank-number {
    background: linear-gradient(180deg, #602B45 0%, #191D29 100%);
    color: #FFFEF2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.rank-game-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
    flex-shrink: 0;
}

.rank-game-title {
    font-size: 1.1rem;
    font-weight: 600;
    flex-grow: 1;
}

.restart-btn,
.refine-btn {
    background: linear-gradient(180deg, #602B45 0%, #191D29 100%);
    margin-top: 20px;
}

.restart-btn:hover,
.refine-btn:hover {
    background: linear-gradient(180deg, #362342 0%, #191D29 100%);
}

.error {
    display: block;
    color: #D55243;
    margin-top: 16px;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}


@media (max-width: 768px) {
    .container {
        padding: 24px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .games-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .game-card {
        padding: 15px;
    }

    .game-image {
        width: 100px;
        height: 100px;
    }

    .input-group {
        flex-direction: column;
    }

    .controls {
        gap: 10px;
    }

    .btn,
    .skip-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

.swipe-indicator {
    position: absolute;
    top: 50%;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 0.2s;
    z-index: 10;
}

.swipe-left {
    left: 20px;
}

.swipe-right {
    right: 20px;
}

.powered-by {
    padding: 24px;
    display:  flex;
    justify-content: center
}