/* Import Angry Birds style font */
@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Poppins:wght@400;600;700&display=swap');

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

body {
    font-family: 'Lilita One', cursive;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.game-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 30px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.5);
    overflow: hidden;
    max-width: 1400px;
    width: 100%;
    position: relative;
    backdrop-filter: blur(20px);
    animation: floatIn 0.8s ease-out;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Menu Screens */
.menu-screen {
    padding: 80px 40px;
    text-align: center;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    position: relative;
    overflow: hidden;
}

.menu-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.menu-screen h1 {
    font-size: 4.5em;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 5px 15px rgba(118, 75, 162, 0.3);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: titleGlow 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 4px 8px rgba(118, 75, 162, 0.3)) brightness(1); }
    50% { filter: drop-shadow(0 6px 20px rgba(118, 75, 162, 0.6)) brightness(1.1); }
}

.menu-stats {
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.silver-display {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px 50px;
    border-radius: 60px;
    font-size: 2em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(245, 87, 108, 0.4), inset 0 -3px 10px rgba(0, 0, 0, 0.2);
    animation: coinFloat 3s ease-in-out infinite;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

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

.silver-icon {
    font-size: 1.3em;
    animation: coinSpin 4s linear infinite;
}

@keyframes coinSpin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.menu-btn {
    padding: 25px 50px;
    font-size: 1.7em;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.menu-btn:hover::before {
    width: 400px;
    height: 400px;
}

.tutorial-btn {
    background: linear-gradient(135deg, #ffa500 0%, #ffcc00 100%);
    box-shadow: 0 10px 30px rgba(255, 165, 0, 0.4);
}

.play-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 10px 30px rgba(56, 239, 125, 0.4);
}

.shop-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 10px 30px rgba(118, 75, 162, 0.4);
}

.back-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    max-width: 350px;
    margin: 40px auto 0;
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4);
}

.daily-reward-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4);
    animation: rewardPulse 2s ease-in-out infinite;
}

@keyframes rewardPulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4); }
    50% { box-shadow: 0 15px 40px rgba(245, 87, 108, 0.6), 0 0 30px rgba(245, 87, 108, 0.3); }
}

.menu-btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.menu-btn:active {
    transform: translateY(-4px) scale(1.02);
}

/* Shop */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.shop-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    padding: 30px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 40px rgba(118, 75, 162, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.shop-item::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.shop-item:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 60px rgba(118, 75, 162, 0.5);
}

.shop-item.locked {
    opacity: 0.7;
    filter: grayscale(50%);
}

.shop-tower-icon {
    font-size: 4.5em;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.25);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 -5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    animation: iconBob 2s ease-in-out infinite;
}

@keyframes iconBob {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.shop-item h3 {
    margin: 15px 0;
    font-size: 1.8em;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.shop-desc {
    font-size: 1em;
    opacity: 0.95;
    margin: 8px 0;
    position: relative;
    z-index: 1;
}

.shop-stats {
    font-size: 0.95em;
    opacity: 0.9;
    margin: 12px 0;
    position: relative;
    z-index: 1;
}

.shop-price {
    margin-top: 20px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.price-tag {
    display: block;
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 12px;
    color: #ffd700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.buy-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(56, 239, 125, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.buy-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(56, 239, 125, 0.5);
}

.buy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.buy-btn.owned {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    cursor: default;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
}

.hidden {
    display: none !important;
}

.header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 5px 30px rgba(245, 87, 108, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: headerShine 3s linear infinite;
}

@keyframes headerShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.header h1 {
    font-size: 2.5em;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.stats {
    display: flex;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.25);
    padding: 15px 25px;
    border-radius: 15px;
    backdrop-filter: blur(15px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15), inset 0 -2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.stat .label {
    font-size: 1em;
    opacity: 0.95;
    font-weight: 600;
}

.stat span:last-child {
    font-size: 1.8em;
    font-weight: bold;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.game-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 30px;
    align-items: center;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

.bottom-section {
    width: 100%;
    max-width: 1200px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.tower-section {
    flex: 1;
    min-width: 600px;
    max-width: 100%;
}

.tower-section h3 {
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 6px;
    margin-bottom: 10px;
    font-size: 1em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.controls-section {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.tower-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-width: 100%;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

.tower-menu::-webkit-scrollbar {
    width: 8px;
}

.tower-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.tower-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

@media (max-width: 1400px) {
    .tower-menu {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1000px) {
    .tower-menu {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tower-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    text-align: left;
    box-shadow: 0 3px 10px rgba(118, 75, 162, 0.3);
    border: 2px solid transparent;
    position: relative;
    overflow: visible;
    min-width: 0;
    height: auto;
}

.tower-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.tower-button:hover::before {
    left: 100%;
}

.tower-button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(118, 75, 162, 0.5);
}

.tower-button.selected {
    border-color: #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 15px 40px rgba(118, 75, 162, 0.5);
    animation: selectedPulse 1.5s ease-in-out infinite;
}

@keyframes selectedPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tower-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(70%);
}

.tower-icon {
    font-size: 1.5em;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.tower-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.tower-name {
    font-weight: bold;
    font-size: 0.8em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.tower-stats {
    font-size: 0.65em;
    opacity: 0.95;
    font-weight: 600;
    line-height: 1.2;
}

.tower-skill {
    font-size: 0.6em;
    opacity: 0.9;
    font-style: italic;
    line-height: 1.2;
}

.tower-cooldown {
    font-size: 0.55em;
    opacity: 0.95;
    color: #ffd700;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tower-cost {
    font-size: 0.85em;
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 1px 4px rgba(255, 215, 0, 0.5);
    white-space: nowrap;
    flex-shrink: 0;
}

.controls {
    display: flex;
    gap: 15px;
}

.control-btn {
    padding: 20px 30px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    box-shadow: 0 8px 25px rgba(56, 239, 125, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.control-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(56, 239, 125, 0.5);
}

.control-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.tower-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
    min-width: 280px;
    max-width: 320px;
}

.tower-info h3 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 1.2em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.tower-info.hidden {
    display: none;
}

.upgrade-btn {
    padding: 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    margin: 8px 0;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.upgrade-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.5);
}

.upgrade-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.sell-btn {
    padding: 12px;
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.5);
}

.game-area {
    flex: 1;
    position: relative;
}

#game-canvas {
    background: linear-gradient(135deg, #a8d5ba 0%, #8bc6a0 100%);
    border-radius: 20px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.15), 0 10px 40px rgba(0, 0, 0, 0.2);
    cursor: crosshair;
    display: block;
    border: 4px solid rgba(255, 255, 255, 0.5);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Daily Reward Modal - Fixed positioning to cover entire screen */
/* Daily Rewards Screen - Full Page */
#daily-reward-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: white;
    padding: 50px;
    border-radius: 30px;
    text-align: center;
    color: #333;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid rgba(245, 87, 108, 0.3);
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.overlay-content h2 {
    font-size: 3em;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overlay-content p {
    font-size: 1.3em;
    margin-bottom: 35px;
    font-family: 'Poppins', sans-serif;
    color: #555;
}

.game-over-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.retry-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    flex: 1;
    max-width: 220px;
    box-shadow: 0 8px 25px rgba(56, 239, 125, 0.4);
}

.exit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex: 1;
    max-width: 220px;
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.4);
}

.retry-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(17, 153, 142, 0.6);
}

.exit-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

#tower-details {
    margin: 15px 0;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 2px solid #ddd;
    transition: background 0.2s;
}

.detail-row:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Daily Rewards */
.daily-reward-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(15px);
}

.daily-reward-content {
    background: white;
    padding: 50px;
    border-radius: 30px;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid rgba(245, 87, 108, 0.3);
}

/* Daily Rewards Screen Styles */
#daily-reward-screen h1 {
    font-size: 3.5em;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.streak-info {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 40px;
    color: #667eea;
    font-weight: bold;
}

.reward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
    width: 100%;
    max-width: 900px;
}

.reward-day {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    border: 4px solid transparent;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.reward-day:hover:not(.locked) {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.reward-day.claimed {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border-color: #38ef7d;
    box-shadow: 0 5px 20px rgba(56, 239, 125, 0.4);
}

.reward-day.current {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: #f5576c;
    animation: rewardPulseDay 2s infinite;
    box-shadow: 0 10px 40px rgba(245, 87, 108, 0.5);
}

@keyframes rewardPulseDay {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 40px rgba(245, 87, 108, 0.5);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 15px 50px rgba(245, 87, 108, 0.7);
    }
}

.reward-day.locked {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(80%);
}

.day-number {
    font-size: 1em;
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

.reward-icon {
    font-size: 2.5em;
    margin: 12px 0;
}

.reward-amount {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.bonus-money {
    color: #f5576c;
    font-size: 0.9em;
    margin-top: 5px;
}

.bonus-label {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 0.75em;
    padding: 5px 12px;
    border-radius: 15px;
    margin-top: 8px;
    display: inline-block;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(245, 87, 108, 0.3);
}

.daily-reward-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.claim-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    flex: 1;
    max-width: 280px;
    font-size: 1.3em;
    padding: 18px 40px;
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.claim-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(245, 87, 108, 0.6);
}

.claim-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(80%);
}

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

/* Tutorial Guide Styling */
#tutorial-guide {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffa500 0%, #ffcc00 100%);
    color: white;
    padding: 20px 40px;
    border-radius: 20px;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 10px 40px rgba(255, 165, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.3);
    z-index: 100;
    animation: guideBounce 2s ease-in-out infinite;
    max-width: 90%;
    text-align: center;
}

@keyframes guideBounce {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* Additional polish */
button {
    font-family: 'Lilita One', cursive;
}

::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #333;
}

/* Dungeons Button */
.dungeons-btn {
    background: linear-gradient(135deg, #8b0000 0%, #ff4500 100%);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.4);
}

.dungeons-btn:hover {
    box-shadow: 0 20px 50px rgba(139, 0, 0, 0.6);
}

/* Dungeons Screen */
.dungeon-subtitle {
    font-size: 1.3em;
    color: #666;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.dungeon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.dungeon-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 25px;
    padding: 35px;
    color: white;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 69, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.dungeon-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.1) 0%, transparent 70%);
    animation: dungeonPulse 3s ease-in-out infinite;
}

@keyframes dungeonPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.dungeon-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 60px rgba(255, 69, 0, 0.4);
    border-color: #ff4500;
}

.dungeon-icon {
    font-size: 5em;
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
    position: relative;
    z-index: 1;
}

.dungeon-card h3 {
    font-size: 2em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ff4500 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.dungeon-desc {
    font-size: 1em;
    opacity: 0.9;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.dungeon-difficulty {
    font-size: 1.1em;
    font-weight: bold;
    color: #ff4500;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.dungeon-reward {
    font-size: 1.2em;
    color: #ffd700;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.dungeon-start-btn {
    background: linear-gradient(135deg, #ff4500 0%, #ff6347 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(255, 69, 0, 0.4);
    position: relative;
    z-index: 1;
    font-family: 'Lilita One', cursive;
}

.dungeon-start-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(255, 69, 0, 0.6);
}

/* Level Selection */
.level-progress {
    margin-bottom: 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    padding: 20px;
    border-radius: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
}

.progress-text {
    font-size: 1.5em;
    color: #667eea;
    font-weight: bold;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 30px;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    position: relative;
    z-index: 1;
}

.level-button {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.level-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: shimmer 3s linear infinite;
}

.level-button:hover:not(.locked) {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 40px rgba(118, 75, 162, 0.5);
}

.level-button.completed {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 8px 20px rgba(56, 239, 125, 0.3);
}

.level-button.completed::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2em;
    color: white;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.level-button.locked {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(70%);
}

.level-button.locked::before {
    content: '🔒';
    position: absolute;
    font-size: 2em;
    z-index: 1;
}

.level-number {
    font-size: 1.3em;
    position: relative;
    z-index: 1;
}

.level-difficulty {
    font-size: 0.6em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Sprite System - Pixel Art Images (1000+ px) */

/* Tower Sprites */
.sprite {
    display: inline-block;
    width: 100px;
    height: 100px;
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.sprite-dart-tower {
    background-image: url('assets/sprites/dart-tower.png');
    background-size: contain;
}

.sprite-glue-gun {
    background-image: url('assets/sprites/glue-gun.png');
    background-size: contain;
}

.sprite-sniper {
    background-image: url('assets/sprites/sniper.png');
    background-size: contain;
}

.sprite-bomb {
    background-image: url('assets/sprites/bomb.png');
    background-size: contain;
}

.sprite-ice {
    background-image: url('assets/sprites/ice.png');
    background-size: contain;
}

.sprite-archer {
    background-image: url('assets/sprites/archer.png');
    background-size: contain;
}

.sprite-fortress {
    background-image: url('assets/sprites/fortress.png');
    background-size: contain;
}

.sprite-smasher {
    background-image: url('assets/sprites/smasher.png');
    background-size: contain;
}

/* UI Icon Sprites */
.sprite-coin {
    background-image: url('assets/sprites/coin.png');
    background-size: contain;
    width: 80px;
    height: 80px;
}

.sprite-heart {
    background-image: url('assets/sprites/heart.png');
    background-size: contain;
    width: 80px;
    height: 80px;
}

.sprite-wave {
    background-image: url('assets/sprites/wave.png');
    background-size: contain;
    width: 80px;
    height: 80px;
}

.sprite-monster {
    background-image: url('assets/sprites/monster.png');
    background-size: contain;
    width: 100px;
    height: 100px;
}

/* Monster color variants */
.sprite-monster-red {
    background-image: url('assets/sprites/monster-red.png');
}

.sprite-monster-blue {
    background-image: url('assets/sprites/monster-blue.png');
}

.sprite-monster-green {
    background-image: url('assets/sprites/monster-green.png');
}

/* Small sprite variants for UI */
.sprite-small {
    width: 50px;
    height: 50px;
}

.sprite-medium {
    width: 80px;
    height: 80px;
}

.sprite-large {
    width: 120px;
    height: 120px;
}

/* Game icon sprite */
.sprite-game-icon {
    background-image: url('assets/sprites/game-icon.png');
    background-size: contain;
    width: 100px;
    height: 100px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}
