/* General Layout */
.alarm-container {
    width: 90%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    background-image: linear-gradient(to top, #f51878, #120405);
    text-align: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.alarm-container:hover {
    transform: scale(1.03);
}

/* Section Headings */
#hh, #hh1 {
    font-size: 26px;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Countdown Display */
.countdown-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.countdown {
    font-size: 50px;
    color: #fff;
    font-weight: bold;
    text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.7);
}

/* Current Time Section */
.current-time-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.current-time-display {
    font-size: 38px;
    color: #fff;
    font-weight: bold;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

/* Alarm and Sound Settings Wrapper */
.alarm-sound-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Alarm Controls Section */
.alarm-controls-section {
    flex: 1;
    padding: 20px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.alarm-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 600px;
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.alarm-controls button {
    font-size: 18px;
    padding: 12px 20px;
    border: none;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(to right, #ff512f, #dd2476);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    flex: 1;
    max-width: 200px;
    text-align: center;
}

.alarm-controls button:hover {
    transform: translateY(-5px);
    background: linear-gradient(to right, #dd2476, #ff512f);
}

/* Sound Settings Section */
.sound-settings-section {
    flex: 1;
    padding: 25px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sound-settings-item {
    flex: 1;
    text-align: left;
}

.sound-settings-item label {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.sound-settings-item select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 10px;
    border: none;
    background: #fff;
    color: #333;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.sound-settings-item select:focus {
    outline: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Custom Time Section */
.custom-time-section {
    margin-bottom: 25px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Input Fields and Buttons */
.custom-time-fields {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Responsive wrap */
}

.custom-time-item {
    flex: 1;
    min-width: 120px;
    text-align: left;
}

.custom-time-item label {
    font-size: 16px;
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.custom-time-item input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border-radius: 10px;
    border: none;
    background: #fff;
    color: #333;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.custom-time-item input:focus {
    outline: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.custom-time-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 600px;
}

.custom-time-buttons button {
    font-size: 18px;
    padding: 12px 25px;
    border: none;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(to right, #0072ff, #00c6ff);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    flex: 1;
    max-width: 200px;
    text-align: center;
}

.custom-time-buttons button:hover {
    transform: translateY(-5px);
    background: linear-gradient(to right, #00c6ff, #0072ff);
}

.reset-custom-btn {
    background: #ff5c5c;
}

.reset-custom-btn:hover {
    background: #ff0000;
}

/* Blinking Effect */
.alarm-ringing {
    animation: blinkRed 1s infinite;
}

@keyframes blinkRed {
    0%, 100% {
        background-color: #ff3333;
    }
    50% {
        background-color: #800000;
    }
}

/* Fully Responsive Design */
@media (max-width: 1024px) {
    .countdown {
        font-size: 40px;
    }

    .current-time-display {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .alarm-container {
        padding: 20px;
    }

    #hh, #hh1 {
        font-size: 22px;
    }

    .alarm-sound-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .button-row {
        flex-direction: column;
        gap: 10px;
    }

    .custom-time-fields {
        flex-direction: column;
        gap: 10px;
    }

    .alarm-controls button,
    .custom-time-buttons button {
        max-width: 100%;
    }

    button {
        width: 100%;
        margin-bottom: 10px;
    }
}
