* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #fff;
    background: radial-gradient(circle at top, #172554, #05070d 60%);
}

.app {
    width: 100%;
    max-width: 650px;
    padding: 32px;
    text-align: center;
    background: #0b1020;
    border: 1px solid #273354;
    border-radius: 22px;
    box-shadow: 0 20px 60px #0009;
}

.logo {
    font-size: 35px;
}

h1 {
    margin: 8px 0;
    letter-spacing: 2px;
}

.header p {
    color: #8993aa;
    margin-bottom: 28px;
}

.teams {
    display: flex;
    gap: 14px;
    align-items: end;
}

.teams div {
    flex: 1;
    min-width: 0;
}

.teams span {
    color: #f1c75b;
    font-weight: bold;
    padding-bottom: 13px;
}

label {
    display: block;
    text-align: left;
    color: #8993aa;
    font-size: 11px;
    margin-bottom: 7px;
}

input,
select {
    width: 100%;
    min-width: 0;
    padding: 13px;
    background: #11182a;
    border: 1px solid #2a3655;
    border-radius: 10px;
    color: #fff;
    outline: none;
}

input:focus,
select:focus {
    border-color: #6475ff;
}

.caller {
    max-width: 260px;
    margin: 20px auto;
}

.pick p,
.decision p {
    color: #8993aa;
    margin-bottom: 10px;
}

.pick button,
.decision button {
    padding: 11px 22px;
    margin: 4px;
    border: 1px solid #303d5e;
    border-radius: 9px;
    background: #11182a;
    color: #fff;
    cursor: pointer;
}

.pick button.active,
.decision button:hover {
    background: #5865f2;
    border-color: #5865f2;
}

.coin-area {
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 800px;
}

.coin {
    width: 105px;
    height: 105px;
    position: relative;
    transform-style: preserve-3d;
}

.side {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffe58a, #b88620);
    border: 6px solid #e0b84c;
    color: #332507;
    font-size: 40px;
    font-weight: bold;
    backface-visibility: hidden;
}

.back {
    transform: rotateY(180deg);
}

.flip-heads {
    animation: heads 1.4s;
}

.flip-tails {
    animation: tails 1.4s;
}

@keyframes heads {
    to {
        transform: rotateY(1080deg);
    }
}

@keyframes tails {
    to {
        transform: rotateY(1260deg);
    }
}

.show-heads {
    transform: rotateY(0deg);
}

.show-tails {
    transform: rotateY(180deg);
}

.toss {
    padding: 14px 38px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #5865f2, #7c3aed);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 25px #5865f244;
}

.toss:disabled {
    opacity: 0.5;
}

.result {
    margin: 22px 0;
    padding: 16px;
    background: #11182a;
    border: 1px solid #283653;
    border-radius: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.decision {
    display: none;
}

.final-result {
    color: #f1c75b;
    margin-top: 15px;
}

.reset {
    margin-top: 20px;
    background: none;
    border: 0;
    color: #78849d;
    cursor: pointer;
}

/* Mobile Responsive */

@media (max-width: 600px) {
    body {
        padding: 12px;
        align-items: flex-start;
    }

    .app {
        padding: 25px 14px;
        border-radius: 18px;
        margin: auto 0;
    }

    h1 {
        font-size: 25px;
    }

    .header p {
        margin-bottom: 24px;
    }

    .teams {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px;
        align-items: end;
    }

    .teams span {
        padding-bottom: 13px;
        font-size: 12px;
    }

    .teams input {
        padding: 12px 7px;
        font-size: 12px;
    }

    .teams label {
        font-size: 10px;
    }

    .caller {
        max-width: 100%;
        margin: 20px auto;
    }

    .pick button,
    .decision button {
        padding: 11px 17px;
    }

    .coin-area {
        height: 145px;
    }

    .toss {
        width: 100%;
        max-width: 260px;
    }
}
/* Feedback Section */

.feedback-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #273354;
    text-align: left;
}

.feedback-section h2 {
    text-align: center;
    font-size: 19px;
    margin-bottom: 8px;
}

.feedback-section p {
    text-align: center;
    color: #8993aa;
    font-size: 13px;
    margin-bottom: 18px;
}

.feedback-section input,
.feedback-section textarea {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    font-size: 14px;
}

.feedback-section textarea {
    resize: vertical;
    min-height: 90px;
}

.feedback-btn {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #5865f2, #7c3aed);
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.feedback-btn:hover {
    opacity: 0.9;
}

.hidden-field {
    display: none !important;
}

.footer {
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid #273354;
    text-align: center;
    color: #8993aa;
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .feedback-section {
        margin-top: 25px;
        padding-top: 22px;
    }

    .feedback-section h2 {
        font-size: 18px;
    }

    .feedback-section input,
    .feedback-section textarea {
        font-size: 14px;
    }

    .feedback-btn {
        padding: 14px;
    }

    .footer {
        font-size: 11px;
    }
}