@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

body{
    height:100vh;
    background:radial-gradient(circle at top,#1a1a1a,#000 70%);
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    color:#fff;
}
.floating-watches i{
    position:absolute;
    font-size:70px;
    color:rgba(212,175,55,0.08);
    animation:floatUp 25s linear infinite;
}
.floating-watches i:nth-child(1){ left:10%; animation-duration:30s;}
.floating-watches i:nth-child(2){ left:35%; animation-duration:22s;}
.floating-watches i:nth-child(3){ left:65%; animation-duration:26s;}
.floating-watches i:nth-child(4){ left:90%; animation-duration:34s;}

@keyframes floatUp{
    from{ top:110%; }
    to{ top:-15%; }
}
.stopwatch-container{
    position:relative;
    background:linear-gradient(145deg,rgba(255,255,255,0.08),rgba(255,255,255,0.02));
    border:1px solid rgba(212,175,55,0.3);
    backdrop-filter:blur(18px);
    padding:45px 55px;
    border-radius:22px;
    box-shadow:0 25px 50px rgba(0,0,0,0.8);
    text-align:center;
    width:360px;
}
.theme-toggle{
    position:absolute;
    top:20px;
    right:20px;
}

.theme-toggle input{
    display:none;
}

.theme-toggle label{
    width:55px;
    height:28px;
    background:#333;
    border-radius:30px;
    cursor:pointer;
    position:relative;
    display:block;
}

.theme-toggle label::after{
    content:"🌙";
    width:24px;
    height:24px;
    background:#d4af37;
    border-radius:50%;
    position:absolute;
    top:2px;
    left:2px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    transition:0.3s;
}

.theme-toggle input:checked + label{
    background:#ddd;
}

.theme-toggle input:checked + label::after{
    left:29px;
    content:"☀️";
    background:#fff;
}
.title{
    font-size:26px;
    font-weight:600;
    color:#d4af37;
    margin-bottom:25px;
}
.watch-icon{
    font-size:34px;
    margin-right:10px;
    animation:tick 1.2s infinite ease-in-out;
}

@keyframes tick{
    0%,100%{ transform:rotate(0); }
    50%{ transform:rotate(12deg); }
}
.display{
    font-size:50px;
    letter-spacing:4px;
    margin:30px 0;
}
.buttons{
    display:flex;
    gap:18px;
    justify-content:center;
}

.btn{
    padding:12px 26px;
    border:none;
    border-radius:40px;
    cursor:pointer;
    font-size:15px;
    transition:0.3s;
}

.start{
    background:linear-gradient(135deg,#d4af37,#ffd700);
}

.stop{
    background:linear-gradient(135deg,#8b0000,#ff3b3b);
    color:#fff;
}

.reset{
    background:linear-gradient(135deg,#555,#aaa);
}

.btn:hover{
    transform:translateY(-4px) scale(1.08);
}
body.light{
    background:linear-gradient(135deg,#f5f5f5,#ddd);
    color:#000;
}

body.light .stopwatch-container{
    background:#fff;
    border:1px solid #ccc;
}

body.light .title{
    color:#111;
}

body.light .floating-watches i{
    color:rgba(0,0,0,0.05);
}

@media (max-width: 480px) {

    .stopwatch-container{
        width:90%;
        padding:30px 25px;
        border-radius:18px;
    }

    .title{
        font-size:22px;
    }

    .watch-icon{
        font-size:28px;
    }

    .display{
        font-size:38px;
        letter-spacing:2px;
    }

    .buttons{
        gap:12px;
    }

    .btn{
        padding:10px 18px;
        font-size:14px;
    }

    .theme-toggle{
        top:15px;
        right:15px;
        transform:scale(0.9);
    }

    .floating-watches i{
        font-size:50px;
    }
}














