/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f9f3d0 0%, #f5e7a1 100%);
    color: #000;
    min-height: 100vh;
    padding: 15px;
    line-height: 1.6;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Password Overlay Styles */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f9f3d0 0%, #f5e7a1 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.8s ease-out;
}

.password-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: slideUp 0.6s ease-out;
}

.password-container .logo-container {
    margin-bottom: 15px;
}

.password-container h2 {
    color: #000;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

#password-input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #ffd700;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

.password-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(to right, #ffd700, #ffcc00);
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.password-btn:hover {
    background: linear-gradient(to right, #ffcc00, #ffb700);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    font-weight: 500;
    display: none;
}

.error-message.show {
    display: block;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

/* Header styles */
header {
    text-align: center;
    padding: 25px 15px;
    margin-bottom: 25px;
    background: linear-gradient(to right, #ffd700, #ffcc00);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.logo-container {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.logo {
    max-width: 100px;
    height: auto;
    border-radius: 50%;
    border: 3px solid #ffd700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

header p {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

/* Main content */
main {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: slideUp 0.6s ease-out;
}

/* Menu section */
.menu-section {
    width: 100%;
    animation: slideUp 0.5s ease-out;
}

/* Button styles */
.menu-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    background: linear-gradient(to right, #ffd700, #ffcc00);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    text-align: left;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideUp 0.4s ease-out;
    animation-fill-mode: backwards;
}

.menu-btn:nth-child(1) { animation-delay: 0.1s; }
.menu-btn:nth-child(2) { animation-delay: 0.2s; }
.menu-btn:nth-child(3) { animation-delay: 0.3s; }
.menu-btn:nth-child(4) { animation-delay: 0.4s; }
.menu-btn:nth-child(5) { animation-delay: 0.5s; }
.menu-btn:nth-child(6) { animation-delay: 0.6s; }

.menu-btn:hover {
    background: linear-gradient(to right, #ffcc00, #ffb700);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    animation: pulse 0.6s ease infinite;
}

.menu-btn:active {
    transform: translateY(0);
}

.menu-btn.pressed {
    background: linear-gradient(to right, #ffaa00, #ff9900);
    transform: scale(0.98);
}

.day-btn {
    background: linear-gradient(to right, #fff5b3, #ffeaa7);
}

/* Icon styles */
.icon-left {
    margin-right: 12px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: #5c4300;
}

.icon-right {
    margin-left: auto;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    color: #5c4300;
}

#lembar-konfirmasi-btn .icon-right.rotated {
    transform: rotate(180deg);
}

/* Submenu styles */
.submenu {
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.submenu.active {
    display: flex;
    max-height: 300px; /* Adjust based on content */
    opacity: 1;
    transform: translateY(0);
}

.submenu-item {
    padding: 14px;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    background: linear-gradient(to right, #fffaf0, #fff8dc);
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.submenu-item:last-child {
    border-bottom: none;
}

.submenu-item:hover {
    background: linear-gradient(to right, #fffae6, #fff4cc);
    padding-left: 20px;
}

.submenu-item .icon-left {
    margin-right: 12px;
    font-size: 1rem;
    width: 20px;
    color: #5c4300;
}

/* Responsive adjustments */
@media (min-width: 480px) {
    body {
        padding: 20px;
    }

    header {
        padding: 30px 20px;
    }

    .header-icon {
        font-size: 3rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1.2rem;
    }

    .menu-btn {
        font-size: 1.2rem;
        padding: 18px;
    }

    .icon-left {
        font-size: 1.3rem;
    }

    .submenu-item {
        padding: 16px;
    }
}

@media (min-width: 768px) {
    body {
        padding: 30px;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1.3rem;
    }

    .menu-btn {
        font-size: 1.3rem;
        padding: 20px;
        max-width: 500px;
        margin: 0 auto 10px;
    }

    main {
        align-items: center;
    }

    .menu-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}