.padel-scoreboard {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: linear-gradient(135deg, #f6f8fc 0%, #e9eef6 100%);
    min-height: 100vh;
    color: #2c3e50;
}

/* Fullscreen styles */
.padel-scoreboard:fullscreen,
.padel-scoreboard:-webkit-full-screen,
.padel-scoreboard:-moz-full-screen,
.padel-scoreboard:-ms-fullscreen {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow-y: auto !important;
    background: linear-gradient(135deg, #f6f8fc 0%, #e9eef6 100%);
    padding: 20px;
    box-sizing: border-box;
    display: block;
}

.padel-scoreboard:fullscreen .game-view,
.padel-scoreboard:-webkit-full-screen .game-view,
.padel-scoreboard:-moz-full-screen .game-view,
.padel-scoreboard:-ms-fullscreen .game-view {
    position: relative;
    height: auto;
    min-height: auto;
}

.padel-scoreboard:fullscreen .match-container,
.padel-scoreboard:-webkit-full-screen .match-container,
.padel-scoreboard:-moz-full-screen .match-container,
.padel-scoreboard:-ms-fullscreen .match-container {
    position: relative;
    height: auto;
}

/* Match Setup View */
.match-setup-view {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
    background: transparent;
}

.match-type-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.match-type-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 15px 25px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.match-type-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.match-type-option input[type="radio"] {
    display: none;
}

.match-type-option input[type="radio"]:checked + .radio-button + .label-text {
    color: #2196F3;
    font-weight: 600;
}

.match-type-option input[type="radio"]:checked + .radio-button {
    border-color: #2196F3;
    background: #e3f2fd;
}

.radio-button {
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.match-type-option input[type="radio"]:checked + .radio-button:after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #2196F3;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: radioScale 0.2s ease;
}

@keyframes radioScale {
    0% { transform: translate(-50%, -50%) scale(0); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.label-text {
    font-size: 18px;
    color: #64748b;
    transition: color 0.2s ease;
}

.team-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.team {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.team:hover {
    transform: translateY(-2px);
}

.team h2 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.team-1 {
    border-left: 5px solid #2196F3;
    background: linear-gradient(to right, #e3f2fd 0%, #fff 100%);
}

.team-2 {
    border-left: 5px solid #f44336;
    background: linear-gradient(to right, #ffebee 0%, #fff 100%);
}

.team-1 h2 {
    color: #1976D2;
}

.team-2 h2 {
    color: #d32f2f;
}

.player-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 15px;
    min-height: 44px;
    transition: all 0.2s ease;
    background: #fff;
}

.player-input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.start-match-button {
    width: 100%;
    padding: 20px;
    font-size: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #43A047 100%);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    min-height: 44px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(76, 175, 80, 0.2);
    transition: all 0.2s ease;
}

.start-match-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

.start-match-button:active {
    transform: translateY(0);
}

/* Game View */
.game-view {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.game-view-header {
    text-align: center;
    color: #64748b;
    margin: 0;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: none;
    box-shadow: none;
    line-height: 1;
}

.settings-button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    background: linear-gradient(135deg, #64B5F6 0%, #42A5F5 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    min-height: 44px;
    margin-top: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.settings-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(100, 181, 246, 0.2);
}

.match-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    margin: 0 0 15px 0;
    padding: 0 5px;
}

.team-column {
    background: #fff;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s ease;
}

.team-column:hover {
    transform: translateY(-2px);
}

.team-column.team-1 {
    background: linear-gradient(to bottom, #e3f2fd 0%, #fff 100%);
    border-left: 5px solid #2196F3;
}

.team-column.team-2 {
    background: linear-gradient(to bottom, #ffebee 0%, #fff 100%);
    border-left: 5px solid #f44336;
}

.team-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 3px;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

.team-players {
    color: #64748b;
    margin-bottom: 10px;
    font-size: 14px;
}

.score-display {
    font-size: 28px;
    font-weight: 700;
    margin: 5px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.score-display::after {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-shadow: none;
}

.game-points {
    font-size: 42px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    margin-bottom: 10px;
}

.game-points::after {
    margin-top: 5px;
}

.score-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.deuce-indicator {
    color: #f44336;
    font-weight: 600;
    text-align: center;
    font-size: 16px;
    min-height: 24px;
    padding: 6px 12px;
    border-radius: 12px;
    background: #ffebee;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.score-button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: linear-gradient(135deg, #4CAF50 0%, #43A047 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    min-height: 40px;
    margin-top: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(76, 175, 80, 0.2);
    transition: all 0.2s ease;
}

.score-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

.score-button:active {
    transform: translateY(0);
}

.score-log {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.last-point {
    margin-bottom: 12px;
    color: #64748b;
    font-size: 14px;
    min-height: 20px;
    padding: 8px;
    border-radius: 8px;
    background: #f8fafc;
}

.undo-button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    min-height: 44px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.undo-button:hover {
    transform: translateY(-2px);
}

/* Settings Menu */
.settings-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 25px;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 400px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.settings-menu button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    background: #f8fafc;
    color: #2c3e50;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 10px;
    min-height: 44px;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-menu button:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.settings-menu .close-settings {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    color: white;
    text-align: center;
    font-weight: 600;
    justify-content: center;
}

/* Match Statistics */
.match-stats {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 25px;
    border-radius: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 400px;
    animation: modalFadeIn 0.3s ease;
}

.match-stats h2 {
    margin: 0 0 20px 0;
    text-align: center;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.stats-content {
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
}

.stats-content p {
    margin: 10px 0;
    color: #64748b;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-stats {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    min-height: 44px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .padel-scoreboard {
        padding: 0;
    }

    .game-view {
        margin: 0;
        padding: 0;
    }

    .game-view-header {
        padding: 8px 0;
        margin: 0;
    }

    .match-container {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 0 0 15px 0;
        padding: 0 5px;
    }

    .score-separator {
        order: -1;
        margin: 0;
        padding: 5px;
    }

    .team-name {
        font-size: 18px;
    }

    .score-display {
        font-size: 28px;
    }

    .game-points {
        font-size: 36px;
    }

    .match-type-selector {
        flex-direction: column;
    }

    .match-type-option {
        padding: 12px 20px;
    }

    .settings-button {
        top: 5px;
        right: 5px;
    }

    .team-column, .score-log, .settings-menu, .match-stats {
        border-radius: 16px;
    }
}

/* Performance optimizations */
.team-column, .score-button, .undo-button, .settings-button {
    will-change: transform;
    transform: translateZ(0);
}

.score-display, .game-points {
    will-change: contents;
    transform: translateZ(0);
}

/* Optimize animations */
.match-type-option, .team, .team-column, .score-button, .undo-button {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.settings-button {
    transition: transform 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
    .match-type-option, .team, .team-column, .score-button, .undo-button, .settings-button {
        transition: none;
    }
    
    .deuce-indicator {
        animation: none;
    }
    
    .match-stats, .settings-menu {
        animation: none;
    }
}

.doubles-only {
    display: none;
}

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.splash-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    opacity: 0.8;
    z-index: 1;
}

.splash-text {
    position: relative;
    color: white;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    z-index: 2;
    opacity: 0;
    animation: fadeInText 2s ease forwards 0.5s;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.button-container {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    margin-top: 15px;
}

.fullscreen-button {
    padding: 15px;
    font-size: 16px;
    background: linear-gradient(135deg, #64B5F6 0%, #42A5F5 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    min-height: 44px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.fullscreen-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(100, 181, 246, 0.2);
}

.padel-scoreboard-purchase-section {
    max-width: 800px;
    margin: 2em auto;
    padding: 2em;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.padel-scoreboard-purchase-info {
    margin-bottom: 2em;
}

.padel-scoreboard-purchase-info h2 {
    color: #333;
    margin-bottom: 1em;
}

.padel-scoreboard-purchase-info ul {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}

.padel-scoreboard-purchase-info li {
    padding: 0.5em 0;
    padding-left: 1.5em;
    position: relative;
}

.padel-scoreboard-purchase-info li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
}

.padel-scoreboard-price {
    margin: 1.5em 0;
    padding: 1em;
    background: #f8f8f8;
    border-radius: 4px;
}

.padel-scoreboard-price .price-label {
    font-weight: bold;
    margin-bottom: 0.5em;
}

.padel-scoreboard-price .price-amount {
    font-size: 1.5em;
    color: #4CAF50;
    margin: 0;
}

.padel-scoreboard-purchase-actions {
    display: flex;
    gap: 1em;
    align-items: center;
}

.padel-scoreboard-purchase-button .payment-button,
.padel-scoreboard-cart .cart-button {
    display: inline-block;
    padding: 1em 2em;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.padel-scoreboard-purchase-button .payment-button {
    background: #4CAF50;
    color: white;
}

.padel-scoreboard-purchase-button .payment-button:hover {
    background: #45a049;
}

.padel-scoreboard-cart .cart-button {
    background: #f8f8f8;
    color: #333;
    border: 1px solid #ddd;
}

.padel-scoreboard-cart .cart-button:hover {
    background: #eee;
}

.padel-scoreboard-cart .cart-count {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 0.2em 0.6em;
    border-radius: 50%;
    margin-left: 0.5em;
    font-size: 0.9em;
} 