:root{
    --table-green:#0b6e4f;
    --table-green-dark:#084c38;
    --score-bg:#111827;
    --card:#1b263b;
    --text:#ffffff;
    --yellow:#facc15;
    --red:#ef4444;
    --blue:#2563eb;
    --green:#16a34a;
    --shadow:0 4px 15px rgba(0,0,0,.25);
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Inter",sans-serif;
}

html,


body{
    background:
    url("../img/pmpro_back2.png") center center / cover no-repeat fixed,
    linear-gradient(
        180deg,
        var(--table-green),
        var(--table-green-dark)
    );

    color:var(--text);

    padding:
        env(safe-area-inset-top)
        env(safe-area-inset-right)
        env(safe-area-inset-bottom)
        env(safe-area-inset-left);
}

body::before{
    content:"";
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;

    background:rgba(0,0,0,.35);

    z-index:0;
}


.container{

    max-width:1200px;
    margin:auto;
    padding:15px;
    position:relative;
    z-index:1;
}

.logo-area{
    position:absolute;
    top:15px;
    left:10px;
    z-index:1000;
}

.logo{
    height:auto;
    width:190px;
}

/* HEADER */

.app-title{
    text-align:center;
    font-size:30px;
    font-weight:700;
    margin:15px 0 25px;
    letter-spacing:2px;
}

.app-title::before{
    content:"🏓 ";
}

/* CARD */

.card{
    background:
    rgba(255,255,255,.08);
    backdrop-filter:blur(10px);
    border:
    2px solid rgba(
        255,
        255,
        255,
        .15
    );
    border-radius:20px;
    padding:20px;
    margin-bottom:15px;
    box-shadow:var(--shadow);
}

/* INPUT */

input{
    width:100%;
    padding:15px;
    margin-bottom:12px;
    border:none;
    border-radius:12px;
    font-size:16px;
}

input:focus{
    outline:none;
}

/* BUTTON */

button{
    border:none;
    border-radius:14px;
    cursor:pointer;
    transition:.15s;
}

button:active{
    transform:scale(.96);
}

/* PRIMARY */

.btn-primary{
    width:100%;
    padding:18px;
    font-size:20px;
    font-weight:bold;
    background:var(--blue);
    color:white;
}

/* MATCH INFO */

.match-info{
    text-align:right;
    margin-bottom:15px;
}

.match-info h2{
    margin-top:12px;
    font-size:28px;
    font-weight:700;
}

.match-info p{
    font-size:15px;
    font-weight:700;
    opacity:.9;
    color:#67C090;
}

/* SCOREBOARD */

.scoreboard{
    width:100%;
}

/* PLAYERS */

.players{
    display:flex;
    gap:30px;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.player{
    flex:1;
    text-align:center;
}

.player-name{
    font-family: 'Bebas Neue', sans-serif;
    font-size:28px;
    font-weight:700;
    margin-bottom:10px;
    text-transform:uppercase;
}

/* SCORE */

.score{
    font-family: 'Rajdhani', sans-serif;
    font-size:
    clamp(
        80px,
        10vw,
        150px
    );
    font-weight:900;
    line-height:1;
    color:white;
    text-shadow:
    0 0 10px rgba(
        255,
        255,
        255,
        .15
    );
}

/* SET */

.set{
    margin-top:10px;
    font-size:24px;
    color:var(--yellow);
    font-weight:700;
}

/* SERVICE */

.service-box{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    margin-top:20px;
    padding-top:15px;
    border-top:
    1px solid rgba(
        255,
        255,
        255,
        .15
    );
    font-size:24px;
    font-weight:700;
}

.service-ball{
    font-size:30px;
}

.service-active{
    color:var(--yellow);
}

/* SCORE BUTTONS */

.score-buttons{
    display:flex;
    gap:12px;
    margin-top:15px;
}

.score-buttons button{
    flex:1;
    padding:20px;
    font-size:30px;
    font-weight:bold;
}

.btn-plus{
    background:var(--green);
    height: 100px;
    color:white;
}

.btn-minus{

    background:var(--red);

    color:white;
}

/* ACTION BUTTONS */

.actions{
    display:grid;
    grid-template-columns:
    repeat(4,1fr);
    gap:10px;
    margin-top:20px;
}

.actions button{
    padding:16px;
    font-size:16px;
    font-weight:bold;
}

.btn-service{
    background:#FF9D23;
    color:white;
}

.btn-position{
    background:#3B7597;
    color:white;
}

.btn-start{
    background:#16a34a;
    color:white;
}

.btn-finish{
    background:#dc2626;
    color:white;
}

.btn-undo{
    background:#475569;
    color:white;
}

/* STATUS */

.status{
    margin-top:15px;
    font-weight:bold;
    text-align:left;
}

.online{
    color:#67C090;
}

.offline{
    color:#ef4444;
}

/* TABLET */

@media(max-width:900px){
    .player-name{
        font-size:22px;
    }
    .score{
        font-size:80px;
    }
    .set{
        font-size:20px;
    }
}

/* MOBILE PORTRAIT */

@media(max-width:768px){
    .players{
        gap:10px;
    }
    .player-name{
        font-size:18px;
    }
    .score{
        font-size:70px;
    }
    .set{
        font-size:18px;
    }
    .service-box{
        font-size:18px;
    }
    .service-ball{
        font-size:24px;
    }
    .score-buttons button{
        font-size:22px;
        padding:15px;
    }
    .actions{
        grid-template-columns:
        repeat(2,1fr);
    }
    .actions button{
        font-size:14px;
    }
}

/* EXTRA SMALL */

@media(max-width:480px){
    .container{
        padding:10px;
    }
    .score{
        font-size:56px;
    }
    .player-name{
        font-size:16px;
    }
    .set{
        font-size:16px;
    }
    .service-box{
        font-size:16px;
    }
}

@media(max-width:768px){

    .bottom-menu{

        display:grid;

        grid-template-columns:
        repeat(2,1fr);

        width:95%;

        gap:10px;
    }

    .menu-btn{

        min-width:unset;
        max-width:none;

        width:100%;

        font-size:14px;
        padding:15px;
    }

}

/* LANDSCAPE PRIORITY */

@media (orientation:landscape){
    .score{
        font-size:
        clamp(
            90px,
            10vw,
            160px
        );
    }
    .actions{
        grid-template-columns:
        repeat(4,1fr);
    }
}

/* ===================================
   HOME PAGE
=================================== */

.home-page{

    min-height:100vh;
    max-width:none;

    display:flex;
    justify-content:center;
    align-items:center;
}

.logo-center{
    position:absolute;
    top:38%;
    left:50%;
    transform:translate(-50%, -50%);
}

.home-logo{

    width:350px;
    max-width:80vw;
    height:auto;

    filter:
    drop-shadow(
        0 5px 20px rgba(0,0,0,.25)
    );
}

/* MENU BAWAH */

.bottom-menu{

    position:fixed;
    bottom:40px;
    left:50%;

    transform:translateX(-50%);

    display:flex;
    gap:20px;
}

.icon-btn{

    width:120px;
    height:90px;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    gap:10px;

    background:rgba(255,255,255,.10);

    border:1px solid rgba(255,255,255,.15);

    color:white;

    backdrop-filter:blur(10px);

    box-shadow:var(--shadow);
}

.icon-btn i{

    font-size:28px;
}

.icon-btn span{

    font-size:14px;
    font-weight:700;
}

.menu-btn:hover{

    transform:
    translateY(-2px);

    background:
    rgba(
        255,
        255,
        255,
        .18
    );
}

.menu-btn:active{

    transform:
    scale(.97);
}

/* ===================================
   PANEL PAGE
=================================== */

.panel-header{

    margin-bottom:20px;
}

.header-logo img{

    width:190px;
    height:auto;

    cursor:pointer;
}

/* CAMERA */

.camera-title{

    text-align:center;

    font-size:22px;
    font-weight:700;

    margin-bottom:15px;
}

.camera-preview{

    width:100%;
    height:400px;

    border-radius:16px;

    border:
    2px dashed rgba(
        255,
        255,
        255,
        .25
    );

    background:
    rgba(
        0,
        0,
        0,
        .15
    );

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:22px;
    font-weight:700;

    color:
    rgba(
        255,
        255,
        255,
        .7
    );
}

/* ADD PANEL */

.btn-add-panel{

    width:100%;

    padding:20px;

    margin-top:15px;

    font-size:20px;
    font-weight:700;

    background:
    linear-gradient(
        180deg,
        var(--table-green),
        var(--table-green-dark)
    );

    color:white;

    border:
    2px solid rgba(
        255,
        255,
        255,
        .15
    );

    box-shadow:var(--shadow);
}

.btn-add-panel:hover{

    filter:brightness(1.1);
}

/* MOBILE */

@media(max-width:768px){

    .header-logo img{

        width:140px;
    }

    .camera-preview{

        height:280px;

        font-size:18px;
    }

    .btn-add-panel{

        font-size:18px;
        padding:18px;
    }

}

/* ===================================
   JADWAL
=================================== */

.page-title{

    text-align:center;

    margin-bottom:20px;

    font-size:32px;
    font-weight:700;
}

.schedule-list{

    display:flex;
    flex-direction:column;

    gap:15px;
}

.schedule-card{

    background:
    rgba(255,255,255,.08);

    backdrop-filter:blur(10px);

    border:
    1px solid rgba(
        255,
        255,
        255,
        .15
    );

    border-radius:20px;

    padding:20px;

    box-shadow:var(--shadow);
}

.schedule-player{

    text-align:center;

    font-size:28px;
    font-weight:700;

    text-transform:uppercase;
}

.schedule-vs{

    text-align:center;

    margin:10px 0;

    font-size:18px;

    color:var(--yellow);

    font-weight:700;
}

.schedule-info{

    margin-top:15px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    font-size:16px;

    color:#67C090;

    border-top:
    1px solid rgba(
        255,
        255,
        255,
        .15
    );

    padding-top:12px;
}

/* ===================================
   STATISTIK
=================================== */

.stats-grid{

    display:grid;

    grid-template-columns:
    repeat(2,1fr);

    gap:15px;

    margin-bottom:20px;
}

.stats-card{

    background:
    rgba(255,255,255,.08);

    backdrop-filter:blur(10px);

    border:
    1px solid rgba(
        255,
        255,
        255,
        .15
    );

    border-radius:20px;

    padding:20px;

    text-align:center;

    box-shadow:var(--shadow);
}
.stats-value{

    font-size:48px;
    font-weight:700;

    color:var(--yellow);
}

.stats-label{

    margin-top:10px;

    font-size:16px;
    font-weight:600;
}

.stats-title{

    margin-bottom:15px;

    text-align:center;

    font-size:24px;
}

.stats-table{

    width:100%;

    border-collapse:collapse;
}

.stats-table th{

    background:
    rgba(
        255,
        255,
        255,
        .10
    );

    padding:12px;

    text-align:left;
}

.stats-table td{

    padding:12px;

    border-top:
    1px solid rgba(
        255,
        255,
        255,
        .10
    );
}

.stats-table tr:hover{

    background:
    rgba(
        255,
        255,
        255,
        .05
    );
}

/* ===================================
   SETTINGS PAGE
=================================== */

.settings-card{

    background:
    rgba(255,255,255,.08);

    backdrop-filter:blur(10px);

    border:
    1px solid rgba(255,255,255,.15);

    border-radius:20px;

    padding:25px;

    box-shadow:var(--shadow);
}

.form-grid{

    display:grid;

    grid-template-columns:
    repeat(2,1fr);

    gap:15px;
}

.form-group{

    display:flex;
    flex-direction:column;
}

.form-group label{

    font-size:14px;
    font-weight:700;

    margin-bottom:6px;

    color:#ffffffcc;
}

.form-group input{

    padding:14px;

    border-radius:12px;

    border:1px solid rgba(255,255,255,.15);

    background:rgba(0,0,0,.25);

    color:white;

    font-size:16px;
}

.form-group input:focus{

    outline:none;

    border-color:var(--yellow);
}

/* BUTTON SAVE */

.btn-save{

    width:100%;

    margin-top:20px;

    padding:18px;

    font-size:18px;
    font-weight:800;

    background:
    linear-gradient(
        180deg,
        var(--green),
        var(--table-green-dark)
    );

    color:white;

    border:none;

    border-radius:14px;

    cursor:pointer;

    box-shadow:var(--shadow);
}

.btn-save:hover{

    filter:brightness(1.1);
}

/* MOBILE */

@media(max-width:768px){

    .form-grid{

        grid-template-columns:1fr;
    }

}