/* Bowling Scoreboard Styling */
.bowling-scoreboard {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.bowling-scoreboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.scoreboard-header {
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
}

.player-scoreboard {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.player-name {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.total-score {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    font-size: 2.5rem;
    font-weight: 900;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4); }
    to { box-shadow: 0 15px 40px rgba(255, 107, 107, 0.6); }
}

.frames-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.8rem;
    margin-top: 1.5rem;
    overflow-x: auto;
}

.bowling-frame {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 0.8rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    min-height: 110px;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bowling-frame:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.frame-number {
    color: #feca57;
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.frame-rolls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.roll {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.strike-mark {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
    animation: strikeGlow 1.5s ease-in-out infinite alternate;
}

@keyframes strikeGlow {
    from { box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4); }
    to { box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6); }
}

.spare-mark {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.normal-roll {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.gutter-mark {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.frame-score {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.tenth-frame {
    grid-column: span 1;
}

.tenth-frame .frame-rolls {
    justify-content: space-around;
}

.invisible {
    visibility: hidden;
}

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

.card {
    animation: fadeIn 0.5s ease-out forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* Legacy frame box styling for other pages */
.frame-box {
    width: 4.5rem;
    border: none;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin: 0.25rem;
}

.frame-box:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #ffffff 0%, #e9ecef 100%);
}

.frame-box .frame-number {
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    color: #495057;
    font-size: 1.1rem;
}

.frame-box .d-flex > span {
    flex: 1;
    text-align: center;
}

/* Global body styling */
body {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64'><g fill='rgba(255,255,255,0.05)'><rect x='20' y='10' width='4' height='20' rx='2'/><rect x='30' y='10' width='4' height='20' rx='2'/><rect x='40' y='10' width='4' height='20' rx='2'/><circle cx='32' cy='48' r='10'/></g></svg>"), linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-repeat: repeat, no-repeat;
    background-size: 64px 64px, auto;
    min-height: 100vh;
}

/* Player stats table styling */
.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
    transition: all 0.2s ease;
}

.table thead th {
    border-bottom-width: 2px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    color: #fff;
}

.table tbody td {
    color: #adb5bd;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Player stats cards */
.player-stat-card {
    transition: transform 0.3s ease;
}

.player-stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.player-stat-card h3 {
    font-size: 2.5rem;
    font-weight: 300;
}

.player-stat-card .text-primary {
    color: #4dabf7 !important;
}

.player-stat-card .text-success {
    color: #51cf66 !important;
}

.player-stat-card .text-danger {
    color: #ff6b6b !important;
}

.player-stat-card .text-info {
    color: #74c0fc !important;
}

.player-stat-card .text-warning {
    color: #ffd43b !important;
}

.player-stat-card .text-secondary {
    color: #adb5bd !important;
}

/* Card hover effects */
.card:hover {
    transform: translateY(-3px);
    transition: all 0.3s ease;
}
