@font-face {
    font-family: 'fredoka';
    src: url('../fonts/fredoka.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'fredoka';
    src: url('../fonts/fredoka.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Fredoka', sans-serif;
}

body {
    background: linear-gradient(145deg, #fffdd0, #ffffe0);
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 1.5s ease-in-out;
}

/* Header */
header {
    background-color: #ffde7d;
    padding: 20px;
    border-bottom: 5px dotted #ff6f61;
    animation: bounceIn 1s ease;
}

header h1 {
    color: #cd7f32;
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 2px 2px #ffd6d6;
}

/* Menu */
.menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.menu button {
    padding: 10px 15px;
    border: 2px solid #ffd6d6;
    border-radius: 20px;
    background-color: #fffaf7;
    cursor: pointer;
    color: #ff6f61;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease, transform 0.2s ease;
}

.menu button:hover {
    background-color: #ffb6b9;
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 5px 15px rgba(255, 111, 97, 0.3);
}

/* Container */
.container {
    margin: 20px auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border: 3px dashed #f1ec82;
    background: #fffdd1;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 180, 180, 0.3);
    flex: 1;
    animation: slideIn 1s ease;
}

/* Inputs */
input[type="text"],
input[type="number"] {
    padding: 10px;
    margin: 10px 0;
    border-radius: 12px;
    border: 2px solid #ffd6d6;
    width: 100%;
    max-width: 300px;
    background-color: #fffaf7;
    font-size: 16px;
    transition: box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus {
    box-shadow: 0 0 10px rgba(255, 111, 97, 0.5);
    outline: none;
    animation: shake 0.5s ease;
}

/* Buttons */
#register button,
#edit button,
#salePage button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #cd7f32;
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

#register button:hover,
#edit button:hover,
#salePage button:hover {
    background-color: #a56728;
    transform: translateY(-3px) rotate(-5deg);
    box-shadow: 0 5px 15px rgba(205, 127, 50, 0.3);
}

/* Product Table */
table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
    background-color: #fffaf7;
    border-radius: 10px;
    overflow: hidden;
    animation: fadeIn 1.5s ease-in-out;
}

th, td {
    padding: 12px;
    border: 1px solid #f1ec82;
}

th {
    background-color: #f1ec82;
    color: #cd7f32;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Hidden Sections */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 600px) {
    .menu {
        flex-direction: column;
        align-items: center;
    }

    input[type="text"],
    input[type="number"] {
        width: 100%;
    }
}

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

@keyframes bounceIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes wiggle {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-10px);
    }
}
