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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #1e1e2f;
    color: #ffffff;
}

.container {
    text-align: center;
    background: #2a2a40;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

h1 {
    margin-bottom: 30px;
    font-size: 24px;
    color: #f39c12;
}

.hourglass-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 30px;
}

.glass {
    width: 100px;
    height: 100px;
    border: 4px solid #ffffff;
    position: relative;
    overflow: hidden;
}

#top-glass {
    border-bottom: none;
    border-radius: 10px 10px 50px 50px;
}

#bottom-glass {
    border-top: none;
    border-radius: 50px 50px 10px 10px;
}

.sand {
    width: 100%;
    background-color: #f39c12;
    position: absolute;
    transition: height 1s linear, top 1s linear;
}

/* Başlangıçta üstteki cam dolu, alttaki boş */
#top-sand {
    height: 100%;
    bottom: 0;
}

#bottom-sand {
    height: 0%;
    bottom: 0;
}

.controls button {
    padding: 10px 25px;
    margin: 0 10px;
    border: none;
    border-radius: 8px;
    background-color: #f39c12;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.controls button:hover {
    background-color: #e67e22;
}

#time-display {
    margin-top: 20px;
    font-size: 32px;
    font-weight: bold;
}