/* Base Style */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    /*Checkered Pattern Background*/
    background-color: #ffcd95;
    background-image: 
        linear-gradient(45deg, #ffdeb5 25%, transparent 25%),
        linear-gradient(-45deg, #ffdeb5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ffdeb5 75%),
        linear-gradient(-45deg, transparent 75%, #ffdeb5 75%);
    background-size: 30px 30px;
    background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
    background-color: #ffd595;
    color: #93581a;
    line-height: 1.6;
    padding: 20px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffcd95;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    animation: fadeInUp is ease forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.game {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/*Heading */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.4em;
    color: #b8926c;
    text-shadow: 1px 1px 4px rgba(255, 244, 230, 0.6);
}

header .subtitle {
    font-style: italic;
    color: #d09e7a;
    font-size: 1.2em;
    animation: fadeIn 2s ease forwards;
}

/*Progress Bar */
.stats {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.stats p {
    font-size: 1.2em;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.stats p.animate pulse {
    transform: scale(1.1);
}

.progress-bars {
    display: flex;
    gap: 20px;
}

.progress-bar {
    width: 100%;
    height: 18px;
    background: #ffd7b2;
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: #da8338;
    border-radius: 12px;
    transition: width 0.5s ease;
}

/*CLicking Zone */
.click-zone.card {
    background-color: #ffe9d0;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 196, 140, 0.15);
    margin-bottom: 25px;
}

/*Yarn Container - this is for the sparkles*/
.yarn-container {
    display: inline-block;
    position: relative;
    cursor: pointer;
    width: auto;
    height: auto;
}

#yarn {
    width: 30vw; /* Responsive width */
    max-width: 400px;
    min-width: 180px;
    display: block;
    margin: 0 auto;
    /*yarn itself willl glow*/
    box-shadow: 0 0 40px  rgba(255, 190, 120, 0.5), 0 0 80px rgba(255, 190, 120, 0.3);
    filter: drop-shadow(0 0 20px rgba(255, 185, 120, 0.4));
    will-change: transform, box-shadow;
}

@keyframes yarnGlowPulse {
    0% { box-shadow: 0 0 30px rgba(255, 183, 120, 0.4), 0 0 60px rgba(255, 179, 120, 0.2); }
    50% { box-shadow: 0 0 50px rgba(255, 188, 120, 0.6), 0 0 100px rgba(255, 192, 120, 0.4); }
    100% { box-shadow: 0 0 30px rgba(255, 190, 120, 0.4), 0 0 60px rgba(255, 190, 120, 0.2); }
}

#yarn:hover {
    transform: scale(1.1);
}

#click-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/*Yarn Pulsing Animation*/
.yarn-glow-animation {
    animation: yarnGlowPulse 3s ease-in-out infinite;   
}

/*Shop Selection */
.shop.card {
    background-color: #ffe6d0;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(155,140,255,0.15);
}

.shop-item {
    background-color:#efcba9;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease, background 0.3s ease;
}

.shop-item:hover {
    transform: scale(1.02);
    background-color: #ffe8d9;
}

.shop-item button {
    background-color: #d88f57;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-item button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(216, 143, 87, 0.4);
}

.reset-btn {
    background-color: #ec75b2;
    color: white;
    border: none;
    font-weight: bold;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/*RESET BTN HOVER */

#season-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
}

/* TOOL TIPS FOR BUTTONS */


/* Crafting Section */
.crafting.card {
    background-color: #ffe6d0;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(255, 190, 140, 0.15);
}

#crafting-slots {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.crafting-slot {
    background-color: #efc7a9;
    padding: 12px;
    border-radius: 10px;
    flex: 1 1 100px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

/* CRAFTING SLOT HOVER */


#inventory {
    font-weight: bold;
    margin-bottom: 8px;
}

#sell-items {
    background-color: #e29751;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;  
}

#sell-items:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(226, 149, 81, 0.4);
}

/* Crafting Buttons */
.crafting-slot button {
    background: linear-gradient(135deg, #d57235, #ffc1a0);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: bold;
    font-size: 0.95em;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(255, 172, 120, 0.4);
    transition: transform 0.15s ease, box-shadow 0.2 ease, background 0.2 ease;
}

.crafting-slot button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(255, 183, 120, 0.6);
    background: linear-gradient(135deg, #db8c3d, #ffcba8);
}

.crafting-slot button:active {
    transform: scale(0.97);
    box-shadow: 0 3px 8px rgba(255, 174, 120, 0.5); 
}

/* Achievements */
.achievements.card {
    background-color: #ffe6d0;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(255, 188, 140, 0.15);
}

.achievements ul {
    list-style: none;
}

.achievement {
    background-color: #efc7a9;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.achievement.unlocked {
    background-color: #ffc6a0;
    color: #73432f;
    box-shadow: 0 0 12px #ffc6a0;
    transform: scale(1.03);
    animation: shine 1s ease forwards;
}

@keyframes shine {
    0% { box-shadow: 0 0 0px #ffc6a0; }
    50% { box-shadow: 0 0 20px #ffc6a0; }
    100% { box-shadow: 0 0 0px #ffc6a0; }
}

/* Popup */
#popup {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%) translateY(-20%);
    background-color: rgba(255, 240, 230, 0.95);
    color: #875c32;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: bold;
    display: none;
    opacity: 0;
    box-shadow: 0 4px 12px  rgba(131, 83, 53, 0.2);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

@keyframes popupAnim {
    0% { opacity: 0; transform: translate(-50%, -20%); }
    100% { opacity: 1; transform: translate(-50%, 0); }
}

/* Footer */
footer {
    text-align: center;
    color: #d0947a;
    font-size: 0.9em;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px dashed #f0e0d8;
}

/* ANIMATIONS */

/* RESPONSIVE ANIMATIONS */