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

body {
    font-family: verdana, arial, helvetica, sans-serif;
    background: #AAE0AA;
    color: #000;
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.4;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 30px;
    background: #e8f5e8;
    padding: 5px 25px;
    border: 1px solid #bababa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

/* Franchise toggle styling */
.franchise-toggle-container {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label {
    font-size: 12px;
    color: #006600;
    font-weight: bold;
    user-select: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
    border: 1px solid #999;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    border: 1px solid #999;
}

input:checked + .toggle-slider {
    background-color: #90c490;
    border-color: #70a470;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
    border-color: #70a470;
}

.toggle-slider:hover {
    background-color: #ddd;
}

input:checked + .toggle-slider:hover {
    background-color: #a0d4a0;
}

/* Info icon styling */
.info-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f0f8f0;
    border: 1px solid #90c490;
    color: #006600;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 5px;
    font-family: verdana, arial, helvetica, sans-serif;
}

.info-icon:hover {
    background: #e0f0e0;
    border-color: #70a470;
    transform: scale(1.1);
}

.info-icon:active {
    transform: scale(0.95);
}

.logo {
    max-height: 225px;
    max-width: 100%;
    height: auto;
    margin-bottom: -100px;
    margin-top: -50px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.how-to-play-btn {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4f0d4 100%);
    border: 2px solid #90c490;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: bold;
    color: #006600;
    cursor: pointer;
    font-family: verdana, arial, helvetica, sans-serif;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    margin-top: 8px;
}

.how-to-play-btn:hover {
    background: linear-gradient(135deg, #d4f0d4 0%, #c0e0c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,102,0,0.2);
    border-color: #70a470;
}

.how-to-play-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.popup-content {
    background: #fff;
    border: 2px solid #bababa;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #eee;
    background: #f8f8f8;
    border-radius: 6px 6px 0 0;
}

.popup-header h2 {
    font-family: tahoma, verdana, arial, helvetica, sans-serif;
    font-size: 20px;
    color: #006;
    margin: 0;
    font-weight: bold;
}

.close-popup {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-popup:hover {
    background: #f0f0f0;
    color: #333;
}

.popup-body {
    padding: 25px;
    line-height: 1.6;
    font-size: 15px;
}

.popup-body p {
    margin: 0 0 15px 0;
    color: #333;
}

.popup-body ul {
    margin: 15px 0;
    padding-left: 20px;
}

.popup-body li {
    margin: 8px 0;
    color: #333;
}

.popup-body strong {
    color: #006;
    font-weight: bold;
}

.popup-footer {
    padding: 15px 25px 25px;
    text-align: center;
    border-top: 1px solid #eee;
    background: #f8f8f8;
    border-radius: 0 0 6px 6px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    font-size: 15px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.stat {
    background: #fff;
    padding: 10px 20px;
    border: 1px solid #bababa;
    border-radius: 4px;
    font-weight: normal;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.stat:hover {
    transform: translateY(-1px);
}

.game-area {
    position: relative;
    min-height: 562px;
    background: #fff;
    border: 1px solid #bababa;
    border-radius: 8px;
    padding: 37px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 11px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top: 2px solid #006;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

.game-content {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    min-height: 475px;
    gap: 37px;
    margin-top: 140px;
    margin-bottom: 140px;
}

.character-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.character-card {
    background: #f8f8f8;
    border: 1px solid #bababa;
    border-radius: 8px;
    padding: 37px;
    text-align: center;
    min-height: 275px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.character-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    border-color: #4CAF50;
}

.character-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.character-card h2 {
    font-family: tahoma, verdana, arial, helvetica, sans-serif;
    font-size: 20px;
    margin-bottom: 20px;
    color: #000;
    word-wrap: break-word;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.post-count {
    margin-bottom: 15px;
    transition: opacity 0.3s ease;
}

.post-count span:first-child {
    font-size: 40px;
    font-weight: bold;
    color: #060;
    display: block;
    font-family: tahoma, verdana, arial, helvetica, sans-serif;
    line-height: 1;
}

.post-count .label {
    font-size: 12px;
    color: #666;
    text-transform: lowercase;
}

.post-count.hidden {
    opacity: 0;
}

.question-mark {
    font-size: 60px;
    color: #006;
    font-weight: bold;
    opacity: 0.8;
    font-family: tahoma, verdana, arial, helvetica, sans-serif;
}

.vs-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 175px;
    padding: 0 25px;
}

.instruction-text {
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    color: #006;
    font-family: tahoma, verdana, arial, helvetica, sans-serif;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.vs-text {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin: 15px 0;
    color: #800;
    font-family: tahoma, verdana, arial, helvetica, sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.choice-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    width: 100%;
    min-width: 150px;
}

.choice-btn {
    border: 2px solid #bababa;
    border-radius: 6px;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    font-family: verdana, arial, helvetica, sans-serif;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.choice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.3s ease;
    z-index: 1;
}

.choice-btn .arrow {
    font-size: 18px;
    font-weight: bold;
    z-index: 2;
    position: relative;
}

.choice-btn span {
    z-index: 2;
    position: relative;
}

.choice-btn.higher {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4f0d4 100%);
    border-color: #90c490;
    color: #000;
}

.choice-btn.higher::before {
    background: linear-gradient(135deg, #c8f5c8 0%, #a4e0a4 100%);
}

.choice-btn.higher:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,102,0,0.2);
    border-color: #70a470;
}

.choice-btn.higher:hover::before {
    left: 0;
}

.choice-btn.lower {
    background: linear-gradient(135deg, #f5e8e8 0%, #f0d4d4 100%);
    border-color: #c49090;
    color: #000;
}

.choice-btn.lower::before {
    background: linear-gradient(135deg, #f5c8c8 0%, #e0a4a4 100%);
}

.choice-btn.lower:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(136,0,0,0.2);
    border-color: #a47070;
}

.choice-btn.lower:hover::before {
    left: 0;
}

.choice-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 2px solid #bababa;
    border-radius: 8px;
    padding: 37px;
    z-index: 20;
    min-width: 350px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.result-content {
    text-align: center;
}

.result-text {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 25px;
    font-family: tahoma, verdana, arial, helvetica, sans-serif;
}

.result-text.correct {
    color: #060;
}

.result-text.incorrect {
    color: #800;
}

.result-stats {
    font-size: 16px;
    margin-bottom: 31px;
    color: #000;
    line-height: 1.5;
    background: #f8f8f8;
    padding: 19px;
    border-radius: 6px;
    border: 1px solid #eee;
}

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

.btn {
    border: 2px solid #bababa;
    border-radius: 6px;
    padding: 13px 25px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    font-family: verdana, arial, helvetica, sans-serif;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn.primary {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4f0d4 100%);
    border-color: #90c490;
    color: #006600;
}

.btn.primary:hover {
    background: linear-gradient(135deg, #d4f0d4 0%, #c0e0c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,102,0,0.2);
}

.btn.secondary {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-color: #bababa;
    color: #333;
}

.btn.secondary:hover {
    background: linear-gradient(135deg, #e8e8e8 0%, #ddd 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-message {
    text-align: center;
    padding: 25px;
    color: #800;
    font-size: 13px;
    background: #ffe0e0;
    border: 1px solid #ffaaaa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.counting {
    animation: countUp 0.6s ease-out;
}

@keyframes countUp {
    0% {
        color: #f60;
        transform: scale(1.1);
    }
    100% {
        color: #060;
        transform: scale(1);
    }
}

.secondary-count {
    display: none;
}

.footer {
    margin-top: 37px;
    padding: 25px;
    text-align: center;
    background: #e8f5e8;
    border: 1px solid #bababa;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.footer p {
    margin: 4px 0;
    line-height: 1.4;
}

.footer a {
    color: #006;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    text-decoration: underline;
    color: #004;
}

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

    .logo {
        margin-top: -40px;
    }

    .how-to-play-btn {
        margin-top: 30px;
    }


    .franchise-toggle-container {
        position: static;
        justify-content: center;
        margin: 15px auto 10px;
        max-width: fit-content;
    }

    .stats {
        gap: 10px;
    }

    .game-content {
        flex-direction: column;
        min-height: auto;
        gap: 20px;
        margin-top: 60px;
        margin-bottom: 60px;
    }

    .vs-section {
        order: 2;
        min-width: auto;
        padding: 15px 0;
    }

    .character-container.left {
        order: 1;
    }

    .character-container.right {
        order: 3;
    }

    .character-card {
        max-width: 100%;
        min-height: 180px;
        padding: 20px;
    }

    .choice-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }

    .choice-btn {
        flex: 1;
        max-width: 120px;
    }

    .result-overlay {
        min-width: 260px;
        margin: 0 15px;
    }

    .result-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }

    .report-problem-btn {
        bottom: 15px;
        right: 15px;
        padding: 12px 16px;
        font-size: 13px;
    }

    .report-popup-content {
        width: 95%;
        margin: 10px;
    }

    .form-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .form-buttons .btn {
        width: 100%;
    }
}

/* Report Problem Button */
.report-problem-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    border: 2px solid #e53935;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    font-family: verdana, arial, helvetica, sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    z-index: 100;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.report-problem-btn:hover {
    background: linear-gradient(135deg, #ff5252 0%, #f44336 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    border-color: #d32f2f;
}

.report-problem-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

@media (max-width: 768px) {
    .report-problem-btn {
        padding: 6px 10px;
        font-size: 10px;
        bottom: 10px;
        right: 10px;
        border-radius: 5px;
        border-width: 1px;
    }
}

/* Report Problem Popup */
.report-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    backdrop-filter: blur(3px);
}

.report-popup-content {
    background: #fff;
    border: 2px solid #bababa;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    animation: popupSlideIn 0.3s ease-out;
}

.report-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #eee;
    background: #f8f8f8;
    border-radius: 6px 6px 0 0;
}

.report-popup-header h3 {
    font-family: tahoma, verdana, arial, helvetica, sans-serif;
    font-size: 18px;
    color: #006;
    margin: 0;
    font-weight: bold;
}

.report-subtext {
    padding: 15px 25px 0;
    text-align: center;
}

.report-subtext p {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-style: italic;
}

.report-form {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #bababa;
    border-radius: 4px;
    font-family: verdana, arial, helvetica, sans-serif;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.report-status {
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}

.report-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.report-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.report-status.loading {
    background: #e2f3ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.character-card::after {
    content: "Click to choose";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #666;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    font-style: italic;
}

.character-card:hover::after {
    opacity: 1;
}

/* Changelog Styling */
.changelog-entry {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.changelog-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.changelog-entry h3 {
    font-family: tahoma, verdana, arial, helvetica, sans-serif;
    font-size: 16px;
    color: #003366;
    margin-bottom: 10px;
    font-weight: bold;
    border-left: 3px solid #4CAF50;
    padding-left: 10px;
}

.changelog-entry ul {
    margin: 10px 0;
    padding-left: 20px;
}

.changelog-entry li {
    margin: 6px 0;
    color: #333;
    line-height: 1.5;
}

/* Changelog Footer Button */
.changelog-footer-btn {
    background: #f0f8f0;
    border: 1px solid #90c490;
    color: #006;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: verdana, arial, helvetica, sans-serif;
    font-size: 13px;
    font-weight: normal;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.changelog-footer-btn:hover {
    background: #e0f0e0;
    border-color: #70a470;
    transform: translateY(-0.5px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Character image styles */
.character-image-container {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-height: 220px;
    min-height: 180px;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
    position: relative;
    flex: 1;
}

.character-image {
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: transparent;
}

.character-image.loaded {
    opacity: 1;
}


.character-card {
    min-height: 380px;
    max-height: 550px;
    overflow: hidden;
}


.character-card .character-image-container + .post-count {
    margin-top: 15px;
}


.character-card:has(.character-image-container) {
    min-height: 430px;
}


.character-card h2 + .character-image-container {
    margin-top: 10px;
}


@media (max-width: 768px) {
    .character-image-container {
        max-height: 160px;
        min-height: 120px;
    }

    .character-image {
        max-height: 160px;
    }

    .character-card {
        min-height: 280px;
    }

    .character-card:has(.character-image-container) {
        min-height: 320px;
    }
}
