* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: linear-gradient(145deg, #fff9e8 0%, #ffe6c9 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: 'Quicksand', 'Comic Neue', 'Segoe UI', cursive, sans-serif;
    position: relative;
    overflow-x: hidden;
    color: #3b2a1f;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255,179,71,0.2) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(255,140,66,0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255,219,102,0.1) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

#star-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatStar {
    0% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-12px) rotate(180deg); opacity: 0.8; }
    100% { transform: translateY(0px) rotate(360deg); opacity: 0.3; }
}

.time-motto-container {
    width: 100%;
    max-width: 900px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    z-index: 5;
}

.time-display {
    background: #fff9ef;
    border-radius: 48px;
    padding: 24px 32px;
    text-align: center;
    border: 2px solid #ffe1aa;
    box-shadow: 0 12px 18px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.time-display:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 28px rgba(0,0,0,0.12);
}

.time-display .date {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: #8b5a2b;
    font-weight: 700;
    letter-spacing: 1px;
}

.time-display .clock {
    font-size: 2.6rem;
    font-family: 'Courier New', monospace;
    font-weight: 900;
    color: #ff7b2c;
    letter-spacing: 3px;
    text-shadow: 2px 2px 0 #fff0bb;
}

.motto-display {
    background: #fff4e4;
    border-radius: 48px;
    padding: 22px 28px;
    text-align: center;
    color: #5c412a;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #ffdfaa;
    box-shadow: 0 12px 18px rgba(0,0,0,0.08);
    line-height: 1.7;
    position: relative;
    transition: all 0.25s ease;
}

.motto-display:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 28px rgba(0,0,0,0.12);
}

.motto-display::before {
    content: '"';
    position: absolute;
    top: 6px;
    left: 16px;
    font-size: 2.5rem;
    color: rgba(255,123,44,0.2);
    font-family: Georgia, serif;
    line-height: 1;
}

.motto-display::after {
    content: '"';
    position: absolute;
    bottom: 2px;
    right: 16px;
    font-size: 2.5rem;
    color: rgba(255,123,44,0.2);
    font-family: Georgia, serif;
    line-height: 1;
}

.button-container {
    width: 100%;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #fffff5;
    border-radius: 60px;
    border: 2px solid #ffdfaa;
    box-shadow: 0 18px 28px -8px rgba(0,0,0,0.12);
    position: relative;
    z-index: 5;
}

.func-button {
    height: 115px;
    border: none;
    border-radius: 48px;
    color: #3b2a1f;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 0 rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.15s ease;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.func-button:nth-child(1) {
    background: linear-gradient(145deg, #ffe6bc, #ffcd94);
    box-shadow: 0 6px 0 #d4a056;
    animation-delay: 0.05s;
}
.func-button:nth-child(2) {
    background: linear-gradient(145deg, #ffd9a0, #ffb86c);
    box-shadow: 0 6px 0 #c4853a;
    animation-delay: 0.1s;
}
.func-button:nth-child(3) {
    background: linear-gradient(145deg, #ffcccb, #ff9a9a);
    box-shadow: 0 6px 0 #c46b6b;
    animation-delay: 0.15s;
}
.func-button:nth-child(4) {
    background: linear-gradient(145deg, #b8e6c1, #7dd891);
    box-shadow: 0 6px 0 #5ba86a;
    animation-delay: 0.2s;
}
.func-button:nth-child(5) {
    background: linear-gradient(145deg, #fff0b3, #ffe066);
    box-shadow: 0 6px 0 #c9a830;
    animation-delay: 0.25s;
}
.func-button:nth-child(6) {
    background: linear-gradient(145deg, #ffc4c4, #ff8f8f);
    box-shadow: 0 6px 0 #c45a5a;
    animation-delay: 0.3s;
}

.func-button i {
    font-size: 30px;
    color: #5a3e2b;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.func-button span {
    z-index: 2;
    letter-spacing: 0.5px;
}

.func-button:hover {
    transform: translateY(-6px) scale(1.03);
}

.func-button:nth-child(1):hover { box-shadow: 0 10px 0 #d4a056; }
.func-button:nth-child(2):hover { box-shadow: 0 10px 0 #c4853a; }
.func-button:nth-child(3):hover { box-shadow: 0 10px 0 #c46b6b; }
.func-button:nth-child(4):hover { box-shadow: 0 10px 0 #5ba86a; }
.func-button:nth-child(5):hover { box-shadow: 0 10px 0 #c9a830; }
.func-button:nth-child(6):hover { box-shadow: 0 10px 0 #c45a5a; }

.func-button:hover i {
    transform: scale(1.2) rotate(-8deg);
}

.func-button:active {
    transform: translateY(2px);
}

.func-button:nth-child(1):active { box-shadow: 0 3px 0 #d4a056; }
.func-button:nth-child(2):active { box-shadow: 0 3px 0 #c4853a; }
.func-button:nth-child(3):active { box-shadow: 0 3px 0 #c46b6b; }
.func-button:nth-child(4):active { box-shadow: 0 3px 0 #5ba86a; }
.func-button:nth-child(5):active { box-shadow: 0 3px 0 #c9a830; }
.func-button:nth-child(6):active { box-shadow: 0 3px 0 #c45a5a; }

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    70% {
        transform: translateY(-5px) scale(1.03);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.motto-fade {
    animation: fadeIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.clock-pulse {
    animation: bounce 0.5s ease;
}

@media (max-width: 576px) {
    .time-motto-container {
        margin-bottom: 20px;
        gap: 14px;
    }

    .time-display {
        padding: 18px;
        border-radius: 36px;
    }

    .time-display .date {
        font-size: 0.95rem;
    }

    .time-display .clock {
        font-size: 1.9rem;
    }

    .motto-display {
        padding: 16px 20px;
        font-size: 0.9rem;
        border-radius: 36px;
    }

    .button-container {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
        gap: 14px;
        border-radius: 40px;
    }

    .func-button {
        height: 95px;
        font-size: 14px;
        border-radius: 36px;
    }

    .func-button i {
        font-size: 26px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .button-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .button-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 993px) {
    .button-container {
        grid-template-columns: repeat(6, 1fr);
    }
}
