* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    height: 100vh;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

#craft-menu {
    --menu-width: 1400px;
    --menu-height: 800px;
    width: var(--menu-width);
    height: var(--menu-height);
    background: linear-gradient(135deg, #13131A 0%, #0f0f11 100%);
    padding: 20px;
    border-radius: 12px;
    position: relative;
    text-align: center;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#craft-menu:not(.hidden) {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.container {
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease 0.1s;
}

#craft-menu:not(.hidden) .container {
    opacity: 1;
    transform: translateY(0);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20%;
}

#close-btn:hover {
    background: rgba(255, 59, 59, 0.15);
}

.categories {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.category-btn {
    padding: 12px 24px;
    background: #13131A;
    border: 1px solid transparent;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.category-btn:hover {
    border-color: rgba(255, 255, 255, 0.226);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.category-btn.active {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(82, 82, 82, 0.3);
}

.recipes-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.recipes-container::-webkit-scrollbar {
    width: 8px;
}

.recipes-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.recipes-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 10px;
}

.recipe-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recipe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.recipe-card:hover::before {
    opacity: 1;
}

.recipe-image {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-image {
    transform: scale(1.05);
}

.recipe-name {
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
    font-size: 1.1em;
}

.recipe-requirements {
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 12px;
    line-height: 1.4;
}

.recipe-time {
    font-size: 0.8em;
    color: #888;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: auto;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #13131A 0%, #0f0f11 100%);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.modal:not(.hidden) .modal-content {
    transform: scale(1) translateY(0);
}

.details-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-top: 20px;
}

.craft-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 8px;
}

.qty-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

#craft-quantity-display {
    color: white;
    font-size: 16px;
    font-weight: 500;
    margin: 0 10px;
}

#craft-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#craft-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #13131A 0%, #0f0f11 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification.success {
    border-left: 4px solid #4CAF50;
}

.notification.error {
    border-left: 4px solid #ff3b3b;
}

.notification.show {
    transform: translateX(0);
}

.right-aligned {
    text-align: right;
    margin-left: auto;
}

.left-aligned {
    text-align: left;
    margin-right: auto;
}

#progress-bar-container {
    position: fixed;
    top: 97%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%;
    height: 20px;
    background: linear-gradient(135deg, #13131A 0%, #0f0f11 100%);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.068);
}

#progress-bar-container.show {
    display: block;
}

#progress-bar-fill {
    height: 100%;
    width: 0;
    background: repeating-linear-gradient(
        135deg,
        #2c2c3d,
        #2c2c3d 10px,
        #13131A 10px,
        #13131A 20px
    );
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#progress-bar-percentage {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    font-weight: 600;
}