/* ===================================
   SPEED BURST TYPING - STYLES
   =================================== */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body 
{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    color: #000;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.nav-div
{
    float: left;
    min-height: 60px;
    width: 33%;
    margin: 0.15%;
}
.clearFix
{
    clear: both;
}
.link-area
{
    padding: 20px;    
    padding-left: 40px;    
}
.nav-links
{
    text-decoration: none;
    color: darkred;
    letter-spacing: 0.3px;
}
.logo-area
{
    
}
.user-area
{
    padding: 20px;       
    text-align: right;
}
.game-logo
{
    margin-top: 10px;
}
.game-name
{
    font-size: 16px;
    font-family: monospace;
    color: darkred;
}



/* === LAYOUT === */
.game-layout {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 40px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* === AD CONTAINERS === */
.ad-container {
    background: rgba(0, 0, 0, 0.03);
    border: 2px dashed darkred;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.3s ease;
    text-align: center;
}

.ad-container:hover {
    background: rgba(0, 0, 0, 0.05);
}

.ad-label {
    color: orangered;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Desktop Ads */
.ad-column {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.ad-vertical {
    width: 100%;
    min-height: 511px;
    background: none;
    border: none;
    color: #333;
}

.ad-square {
    width: 100%;
    height: 198px;
}

.ad-gameover {
    width: 100%;
    height: 120px;
    margin: 20px 0;
    border-color: #eee;
    color: aliceblue;
}
.ad-gameover .ad-label{
    color: #eee;
}


.ldb-conainer
{
    background: ;
    border: solid 1px darkred;
    border-radius: 15px;
    text-align: left;
}
.ldb-conainer table th
{
    padding: 10px;
}
.ldb-conainer table td
{
    border: 1px solid #eee;
    border-radius: 5px;    
    padding: 10px
}

/* Mobile Ads - Hidden by Default */
.mobile-only {
    display: none;
}

/* === GAME CONTAINER === */

.game-container {
    background: #fff;
    border-radius: 20px;
    border:1px solid darkred;
    padding: 30px;
    backdrop-filter: blur(10px);
    position: relative;
}

/* Mild danger */
.danger-low {
  box-shadow: 0 0 20px rgba(255, 80, 80, 0.4);
}

/* High danger (pulsing) */
.danger-high {
  animation: dangerPulse 0.6s infinite alternate;
}

@keyframes dangerPulse {
  from {
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.5);
  }
  to {
    box-shadow: 0 0 35px rgba(255, 0, 0, 0.9);
  }
}


/* Shake effect */
.shake {
  animation: shakeGame 0.18s linear;
}

@keyframes shakeGame {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

/* === GAME CONTAINER === */


/* === HEADER & STATS === */
.game-header {
    margin-bottom: 30px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
    min-width: 80px;
}

.stat-label {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: darkred;
}

/* Streak Special Styling */
.streak-stat .streak-value {
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
    transition: all 0.3s ease;
}

.streak-stat .streak-value.milestone {
    animation: streakPulse 0.6s ease;
}

@keyframes streakPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* === PROGRESS BAR === */
.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fff 10%, #fff 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 0px rgba(74, 222, 128, 0.5);
}

/* === GAME AREA === */
.game-area {
    text-align: center;
    padding: 40px 0;
    position: relative;
}

/* === WORD DISPLAY === */
.word-display {
    font-size: 48px;
    font-weight: bold;
    letter-spacing: 4px;
    margin-bottom: 40px;
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.word-display.correct-animation {
    animation: wordPop 0.3s ease;
}

@keyframes wordPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.word-display span {
    display: inline-block;
    color: rgba(0, 0, 0, 0.4);
    transition: all 0.15s ease;
}

.word-display span.correct {
    color: #4ade80;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.word-display span.incorrect {
    color: #ef4444;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.word-display span.current {
    color: #000;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.3);
    text-underline-offset: 8px;
}

/* === INPUT FIELD === */
.typing-input {
    width: 100%;
    max-width: 500px;
    padding: 18px 24px;
    font-size: 24px;
    text-align: center;
    background: rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(149, 6, 6, 0.2);
    border-radius: 12px;
    color: #000;
    outline: none;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    touch-action: manipulation;
}

.typing-input:focus {
    background: rgba(0, 0, 0, 0.12);
    border-color: darkred;
    box-shadow: 0 0 20px rgba(149, 6, 6, 0.3);
}

.typing-input::placeholder {
    color: darkred;
}

/* Prevent zoom on mobile */
@media screen and (max-width: 768px) {
    .typing-input {
        font-size: 16px;
    }
}

/* === BUTTONS === */
.game-button {
    padding: 22px 10px;
    font-size: 10px;
    font-weight: bold;
    background: linear-gradient(135deg, darkred 0%, red 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(149, 6, 6, 0.4);
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 6, 6, 0.6);
}

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

/* Sound Toggle */
.game-controls span
{
    cursor: pointer;
    font-size:19px;
    user-select: none;
}
.sound-toggle {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.sound-toggle.muted .sound-icon::after {
    content: '🔇';
    position: absolute;
}

.sound-toggle.muted .sound-icon {
    opacity: 0;
}

/* === GAME OVER SCREEN === */
.game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:  linear-gradient(140deg, darkred 0%, red 100%);;
    border-radius: 20px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    z-index: 10;
}

.game-over-screen.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-over-title {
    font-size: 48px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #fff 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 500px;
}

.final-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

.final-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.final-value {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
}

.restart-button {
    margin-top: 20px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    padding: 22px 22px;
    font-size: 10px;
    font-weight: bold;
    background: linear-gradient(135deg, #fff 0%, #eee 100%);
    color: darkred;
    border: none;
    border-radius: 10%;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;

}

/* === COMBO EFFECT === */
.combo-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    font-weight: bold;
    color: #4ade80;
    text-shadow: 0 0 30px rgba(74, 222, 128, 0.8);
    pointer-events: none;
    opacity: 0;
    z-index: 1000;
}

.combo-effect.show {
    animation: comboBlast 1s ease;
}

@keyframes comboBlast {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

.img-article
{
    border: 5px double #eee;
    border-radius: 10px;
}

.footer-s
{
    background: #eee;
    text-align: center;
    padding: 10px
}

.footer-s a
{
    color: dodgerblue; 
    text-decoration:none;
}





/* === RESPONSIVE DESIGN === */

/* Tablet */
@media screen and (max-width: 1024px) {
    .game-layout {
        grid-template-columns: 160px 1fr 160px;
        gap: 20px;
        padding: 15px;
    }
    
    .ad-vertical {
        min-height: 400px;
    }
    
    .ad-square {
        height: 200px;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .game-layout {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
    
    /* Hide desktop ads */
    .ad-left,
    .ad-right {
        display: none;
    }
    
    /* Show mobile ads */
    .mobile-only {
        display: flex;
    }
    .ad-bottom
    {
        margin-top:50px;
    }
    
    .ad-top {
        width: 100%;
        height: 100px;
    }
    
    .ad-bottom {
        width: 100%;
        height: 80px;
        position: sticky;
        bottom: 0;
        z-index: 5;
    }
    
    .game-container {
        padding: 20px;
    }
    
    .word-display {
        font-size: 36px;
        letter-spacing: 2px;
        margin-bottom: 30px;
    }
    
    .typing-input {
        font-size: 16px;
        padding: 14px 18px;
    }
    
    .stats-row {
        gap: 10px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .game-over-title {
        font-size: 36px;
    }
    
    .final-stats {
        gap: 15px;
    }
    
    .combo-effect {
        font-size: 48px;
    }
    
    .sound-toggle {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 20px;
        right: 20px;
    }
    .link-area
    {
        display: none;    
    }
    .logo-area
    {
        display: none;
    }
    .user-area
    {
        width: 100%;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .word-display {
        font-size: 28px;
        min-height: 60px;
    }
    
    .stat-item {
        min-width: 20px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .game-button {
        padding-top: 25px;
        padding-bottom: 25px;
        margin-top: 10px;
        font-size: 16px;
    }
}

/* === UTILITY === */
.hidden {
    display: none !important;
}
