/* Styles specific to the index page */

body {
    background-color: #1a1a1a;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.game-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: #222;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
}

.game-title {
    font-size: 32px;
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
    letter-spacing: 2px;
}

.coin-counter {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 5px 15px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.coin-icon {
    width: 20px;
    height: 20px;
    background-color: #FFD700;
    border-radius: 50%;
    margin-right: 5px;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.8);
}

.coin-count {
    font-weight: bold;
    color: #FFD700;
}

.menu-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.play-button, .fusion-button, .shop-button {
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: white;
    width: 100%;
}

.play-button {
    background: linear-gradient(to bottom, #4CAF50, #2E7D32);
    box-shadow: 0 5px 0 #1b5e20;
}

.play-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #1b5e20;
}

.play-button:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #1b5e20;
}

.fusion-button {
    background: linear-gradient(to bottom, #9C27B0, #7B1FA2);
    box-shadow: 0 5px 0 #4A148C;
    position: relative;
    overflow: hidden;
}

.fusion-button::after {
    content: "COMING SOON";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.fusion-button:hover::after {
    transform: translateY(0);
}

.fusion-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #4A148C;
}

.shop-button {
    background: linear-gradient(to bottom, #2196F3, #1976D2);
    box-shadow: 0 5px 0 #0D47A1;
    position: relative;
    overflow: hidden;
}

.shop-button::after {
    content: "COMING SOON";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.shop-button:hover::after {
    transform: translateY(0);
}

.shop-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #0D47A1;
}

.game-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #aaa;
    line-height: 1.5;
    padding: 10px;
    border-top: 1px solid #444;
    width: 100%;
}

.manage-button {
    display: block;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #555;
    width: 100%;
    box-sizing: border-box;
}

.manage-button:hover {
    background-color: #444;
    transform: translateY(-2px);
}

.manage-button:active {
    transform: translateY(1px);
}

/* Gacha Overlay */
.gacha-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gacha-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.gacha-animation {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.gacha-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #AAA;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gacha-character {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #AAA;
    color: white;
    font-size: 40px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0);
}

.gacha-result {
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    text-align: center;
}

.gacha-continue {
    background: linear-gradient(to bottom, #4169E1, #1E3A8A);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.gacha-continue:hover {
    background: linear-gradient(to bottom, #5179F1, #2E4A9A);
    transform: translateY(15px) scale(1.05);
}

.gacha-continue:active {
    transform: translateY(18px) scale(0.98);
}

/* Rarity Badges */
.rarity-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
}

.common {
    background: linear-gradient(135deg, #888, #555);
}

.rare {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.super-rare {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.epic {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
}

.legendary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.super-legendary {
    background: linear-gradient(135deg, #1abc9c, #16a085);
}

/* Gacha Animations by Rarity */
@keyframes common-animation {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes rare-animation {
    0% { opacity: 0; transform: scale(0) rotate(0deg); }
    100% { opacity: 1; transform: scale(1) rotate(360deg); }
}

@keyframes super-rare-animation {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes epic-animation {
    0% { opacity: 0; transform: scale(0); filter: blur(10px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes legendary-animation {
    0% { opacity: 0; transform: scale(0); }
    40% { opacity: 0.8; transform: scale(1.4); }
    60% { opacity: 1; transform: scale(0.8); }
    80% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes super-legendary-animation {
    0% { opacity: 0; transform: scale(0) rotate(0deg); filter: hue-rotate(0deg); }
    20% { opacity: 1; transform: scale(1.5) rotate(180deg); filter: hue-rotate(90deg); }
    40% { opacity: 1; transform: scale(0.8) rotate(360deg); filter: hue-rotate(180deg); }
    60% { opacity: 1; transform: scale(1.3) rotate(540deg); filter: hue-rotate(270deg); }
    80% { opacity: 1; transform: scale(0.9) rotate(720deg); filter: hue-rotate(360deg); }
    100% { opacity: 1; transform: scale(1) rotate(1080deg); filter: hue-rotate(0deg); }
}

@keyframes circle-pulse {
    0% { transform: scale(0); opacity: 0.7; }
    100% { transform: scale(2); opacity: 0; }
}

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

/* Chest Opening Section */
.chest-opening-section {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
    position: relative;
}

.chest-options-title {
    font-size: 16px;
    color: #FFD700;
    margin: 0 0 20px 0;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Carousel Container */
.chest-carousel-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    padding: 0 60px; /* Space for arrows */
    box-sizing: border-box;
}

/* Carousel Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid #FFD700;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.carousel-arrow:hover {
    background: rgba(255, 215, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.prev-arrow {
    left: 0;
}

.next-arrow {
    right: 0;
}

/* Carousel Viewport */
.chest-carousel {
    width: 100%;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

/* Carousel Items Container */
.chest-options-container {
    display: flex;
    transition: transform 0.3s ease-out;
    width: 100%;
}

/* Chest Option Item */
.chest-option {
    flex: 0 0 100%;
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.9), rgba(30, 30, 30, 1));
    border: 3px solid #555;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
    transform-origin: center;
    box-sizing: border-box;
}

.chest-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
}

.chest-option[data-type="basic"]::before {
    background-color: #AAA;
}

.chest-option[data-type="bronze"]::before {
    background-color: #CD7F32;
}

.chest-option[data-type="silver"]::before {
    background-color: #C0C0C0;
}

.chest-option[data-type="gold"]::before {
    background-color: #FFD700;
}

.chest-option[data-type="diamond"]::before {
    background-color: #B9F2FF;
}

.chest-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.6);
    border-color: #888;
}

.chest-option:active {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
}

.chest-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chest-option.active {
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    transform: scale(1.05);
    z-index: 5;
}

.chest-name {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Courier New', monospace;
}

.chest-price {
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.chest-description {
    font-size: 14px;
    color: #ddd;
    text-align: center;
    margin-top: 5px;
}

.chest-option[data-type="basic"] .chest-name {
    color: #AAA;
}

.chest-option[data-type="bronze"] .chest-name {
    color: #CD7F32;
}

.chest-option[data-type="silver"] .chest-name {
    color: #C0C0C0;
}

.chest-option[data-type="gold"] .chest-name {
    color: #FFD700;
}

.chest-option[data-type="diamond"] .chest-name {
    color: #B9F2FF;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chest-carousel-container {
        padding: 0 50px;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .chest-name {
        font-size: 16px;
    }
    
    .chest-price {
        font-size: 20px;
    }
    
    .chest-description {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .chest-carousel-container {
        padding: 0 40px;
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .chest-name {
        font-size: 14px;
    }
    
    .chest-price {
        font-size: 18px;
    }
    
    .chest-description {
        font-size: 10px;
    }
}

/* Welcome message for first-time users */
.welcome-message {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4CAF50;
    border-radius: 10px;
    padding: 20px;
    margin: 15px auto;
    max-width: 90%;
    text-align: center;
    color: white;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    animation: fadeIn 0.5s ease-in-out;
    position: relative;
    z-index: 10;
}

.welcome-message h2 {
    color: #4CAF50;
    margin-top: 0;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.welcome-message p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.5;
}

.close-welcome {
    background: linear-gradient(to bottom, #4CAF50, #2E7D32);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #1b5e20;
}

.close-welcome:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #1b5e20;
}

.close-welcome:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #1b5e20;
}

.welcome-message.hidden {
    display: none;
}

/* Tutorial hint */
.tutorial-hint {
    color: #4CAF50;
    font-style: italic;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
    animation: pulse 2s infinite;
}

/* Resources container */
.resources-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Crystal counter */
.crystal-counter {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 5px 15px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.crystal-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #9C27B0, #E040FB);
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    box-shadow: 0 0 5px rgba(156, 39, 176, 0.8);
}

.crystal-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.7);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.crystal-count {
    font-size: 18px;
    font-weight: bold;
    color: #E040FB;
    text-shadow: 0 0 5px rgba(224, 64, 251, 0.5);
}

/* Coin counter */
.coin-counter {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 5px 15px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.coin-icon-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FFD700"><circle cx="12" cy="12" r="10" stroke="%23B8860B" stroke-width="1"/><text x="12" y="16" font-family="Arial" font-size="12" text-anchor="middle" fill="%23B8860B">$</text></svg>');
    background-size: contain;
    vertical-align: middle;
    margin-left: 4px;
    position: relative;
    top: -2px;
}

.chest-limit-info {
    font-size: 14px;
    color: #aaa;
    margin: 10px 0 20px;
    text-align: center;
} 