*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI',sans-serif;
}

body{
    background: linear-gradient(135deg,#0f172a,#1e293b,#111827);
    color: white;
    min-height: 100vh;
    padding: 20px;
}

.header{
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
    background: linear-gradient(135deg,#f97316,#fb923c,#facc15);
    border-radius: 25px;
    box-shadow: 0 0 30px rgba(249,115,22,.4);
}

.header h1{
    font-size: 3rem;
    margin-bottom: 10px;
    font-weight: 700;
    background: linear-gradient(90deg,#ffffff,rgb(254, 0, 42),green,#ffffff);
    background-size: 200% 100%;
    color: transparent;
    background-position: 0% 50%;
    background-clip: text;
    -webkit-background-clip: text;
    

    animation: shine 10s linear infinite alternate;
}

@keyframes shine{
    0%{
        background-position: 0% center;
    }
    25%{
        background-position: 50% center;
    }
    50%{
        background-position: 100% center;
    }
    75%{
        background-position: 150% center;
    }
    100%{
        background-position: 200% center;
    }
}

.header p{
    margin-top: 10px;
    font-size: 1.1rem;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.85);
    opacity: .9;
}

section{
    margin-bottom: 25px;
    background: rgba(255,255,255,255,.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 25px;
    transition: .3s;
}

section:hover{
    transform: translateY(-4px);
}

h2{
    margin-bottom: 20px;
    color: #facc15;

}

button{
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: .3s;
    background: linear-gradient(135deg,#f97316,#fb923c);
    color: white;
}

button:hover{
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(249,115,22,.5);
}

.mode-toggle{
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mode-toggle button{
    flex: 1;
}

.active{
    background: linear-gradient(135deg,#22c55e,#16a34a);
}

input,textarea{
    width: 100%;
    margin: 10px 0;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: #1e293b;
    color: white;
    outline: none;
    border: 1px solid rgba(255,255,255,.1);
}

textarea{
    min-height: 120px;
    resize: vertical;
}

input:focus,textarea:focus{
    border-color: #f97316;
    box-shadow: 0 0 10px rgba(249,115,22,.4);
}

.action-buttons{
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.winner-card{
    display: none;
    text-align: center;
}

#winnerResult{
    font-size: 1.4rem;
    font-weight: bold;
    color: #22c55e;
}

.stats-container{
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 20px;
}

.card{
    background: rgba(255,255,255,.05);
    border-radius: 18px;
    text-align: center;
    padding: 20px;
    transition: .3s;
}

.card:hover{
    transform: translateY(-8px);
    box-shadow: 0 0 20px rgba(249,115,22,.3);
}

.card h3{
    margin-bottom: 10px;
}

.card p{
    font-size: 2rem;
    font-weight: bold;
    color: #facc15;
}

#matchRuns{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.run-box{
    background: #f97316;
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: bold;
}

.toggle-group{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

#phaseResult,
#phaseWindowResult,
#rangeResult,
#targetResult,
#milestoneResult,
#momentumResult,
#dnaResult,
#insightsResult{
    margin-top: 15px;
    background: rgba(255,255,255,.04);
    border-left: 4px solid #f97316;
    padding: 15px;
    border-radius: 12px;
    line-height: 1.8;

}

.chart-section{
    overflow-x: auto;
}

.chart-container{
    background: #111827;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-top: 20px;
}

.chart-container h2{
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.comparision-section{
    display: none;
}

canvas{
    width: 100%;
    background: transparent;
    border-radius: 15px;
    padding: 10px;
}

@media(max-width:768px){
    .header h1{
        font-size: 1.8rem;
    }

    .action-buttons{
        flex-direction: column;
    }

    button{
        width: 100%;
    }
}

.overBattleContainer{
    display:flex;
    flex-direction:column;
    gap:20px;
    margin-top:20px;
}

.analysisCard{
    background:#1b2945;
    padding:20px;
    border-radius:15px;
    border:1px solid rgba(255,255,255,0.08);
}

.analysisCard h3{
    color:#f9b44d;
    margin-bottom:15px;
}

.analysisCard p{
    color:white;
    margin:6px 0;
}
