:root {
    --primary: #80BC25;
    --secondary: #39AC29;
    --accent: #8640A3;
    --bg-dark: #121212;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: #b0b0b0;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)),
        url('Golfcourse.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 10px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo h1 span {
    color: var(--primary);
}

.reset-btn {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 1px solid var(--glass);
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: var(--glass);
    color: var(--text);
}

/* CARDS */
.setup-card,
.scoring-card,
.summary-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.radio-group {
    display: flex;
    gap: 10px;
}

.radio-group input[type="radio"] {
    display: none;
}

.radio-group label {
    flex: 1;
    padding: 15px;
    background: var(--glass);
    border: 1px solid transparent;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    color: var(--text);
}

.radio-group input[type="radio"]:checked+label {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}

.custom-select,
.custom-input {
    width: 100%;
    padding: 15px;
    background: var(--bg-dark);
    border: 1px solid var(--glass);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

.custom-input {
    cursor: text;
    margin-bottom: 10px;
    background: var(--glass);
}

.custom-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.name-input-wrapper {
    margin-bottom: 5px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select option {
    background-color: var(--bg-dark);
    color: var(--text);
}

.primary-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: block;
    text-align: center;
    text-decoration: none;
}

.primary-btn:active {
    transform: scale(0.98);
}

/* SCORING SCREEN */
.hole-header {
    margin-bottom: 30px;
}

.hole-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-arrow {
    text-decoration: none;
    color: var(--text);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border-radius: 50%;
}

.nav-arrow.disabled {
    opacity: 0.2;
    cursor: default;
}

.hole-info {
    text-align: center;
}

.hole-info .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hole-info .number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.hole-info .par {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.players-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.player-entry {
    background: var(--glass);
    padding: 20px;
    border-radius: 18px;
}

.player-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.player-head h3 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.subtotal {
    font-size: 0.85rem;
}

.stroke-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.stroke-input button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--glass);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.stroke-input input {
    width: 60px;
    background: transparent;
    border: none;
    color: white;
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    font-family: inherit;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.hole-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--glass);
    border-radius: 50%;
    text-decoration: none;
}

.dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.dot.completed {
    border: 1px solid var(--primary);
}

/* SUMMARY */
.table-header,
.table-row,
.table-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 5px;
    border-bottom: 1px solid var(--glass);
    font-size: 0.9rem;
    gap: 5px;
}

.table-header span,
.table-row span,
.table-footer span {
    flex: 1;
    text-align: center;
    min-width: 40px;
}

.col-p {
    text-align: right !important;
    padding-right: 5px;
}

.table-header {
    font-weight: 600;
    color: var(--text-muted);
}

.table-footer {
    border-bottom: none;
    font-weight: 800;
    font-size: 1.1rem;
}

.col-hole,
.col-par {
    text-align: center;
}

.col-p {
    text-align: right;
    overflow: hidden;
    padding-right: 10px;
}

.col-p small {
    color: var(--primary);
    margin-left: 4px;
}

/* ANIMATIONS */
.animate-in {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mt-2 {
    margin-top: 20px;
}

@media (max-width: 400px) {
    .app-container {
        padding: 10px;
    }

    .setup-card,
    .scoring-card,
    .summary-card {
        padding: 20px;
    }
}

/* FOOTER */
.app-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--glass);
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: fadeIn 1s ease-out 0.5s backwards;
}

.app-footer p {
    margin: 0;
}

.app-footer a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px dotted var(--text-muted);
    transition: color 0.3s;
}

.app-footer a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}