/* Jewel Colors */
.jewel-purple { color: #8B5CF6 !important; }
.jewel-pink { color: #EC4899 !important; }
.jewel-blue { color: #007bff !important; }
.jewel-green { color: #28a745 !important; }

/* Mini jewels for progress indicators */
.jewel-purple-mini { color: #8B5CF6 !important; font-size: 0.8rem; }
.jewel-pink-mini { color: #EC4899 !important; font-size: 0.8rem; }
.jewel-blue-mini { color: #007bff !important; font-size: 0.8rem; }
.jewel-green-mini { color: #28a745 !important; font-size: 0.8rem; }

/* Jewel States */
.jewel-collected {
    opacity: 1;
    filter: brightness(1.2) drop-shadow(0 0 10px currentColor);
    animation: sparkle 2s ease-in-out infinite;
}
.jewel-uncollected { opacity: 0.3; filter: grayscale(50%); }
.jewel-sparkle { animation: sparkle 3s ease-in-out infinite; }
@keyframes sparkle {
    0%, 100% { transform: scale(1); filter: brightness(1) drop-shadow(0 0 5px currentColor); }
    50% { transform: scale(1.05); filter: brightness(1.3) drop-shadow(0 0 15px currentColor); }
}

/* Jewel Container */
.jewel-container { position: relative; display: inline-block; }
.jewel-check {
    position: absolute;
    top: -5px;
    right: -5px;
    color: #b30000 !important;
    background: white;
    border-radius: 50%;
    font-size: 1.2rem;
    padding: 2px;
}
.jewel-icon-container { padding: 10px; }

/* Jewel Cards */
.jewel-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff0f0;
}
.jewel-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(179, 0, 0, 0.3); }

/* Jewel Celebration */
.jewel-celebration i {
    margin: 0 10px;
    font-size: 2rem;
    animation: celebration 1s ease-in-out infinite alternate;
}
.jewel-celebration i:nth-child(1) { animation-delay: 0s; }
.jewel-celebration i:nth-child(2) { animation-delay: 0.2s; }
.jewel-celebration i:nth-child(3) { animation-delay: 0.4s; }
.jewel-celebration i:nth-child(4) { animation-delay: 0.6s; }
@keyframes celebration {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1.2) rotate(10deg); }
}

/* Progress indicators */
.jewel-mini-progress { display: flex; gap: 5px; }
.jewel-mini-progress i { font-size: 0.8rem; }

/* Stat boxes */
.stat-box {
    padding: 15px;
    border-radius: 8px;
    background: #fff0f0;
    color: #b30000;
    margin-bottom: 10px;
}
.stat-box h4 { margin: 0; font-size: 2rem; font-weight: bold; }
.stat-box p { margin: 5px 0 0 0; font-size: 0.9rem; }

/* Form enhancements */
.form-control {
    border: 1px solid #b30000;
    background-color: #fff;
    color: #b30000;
    transition: box-shadow 0.3s ease;
}
.form-control:focus {
    border-color: #e60000;
    box-shadow: 0 0 0 0.2rem rgba(230, 0, 0, 0.25);
    background-color: #fff;
    color: #b30000;
}
input.form-control, textarea.form-control, select.form-control { color: #000 !important; }
input.form-control::placeholder, textarea.form-control::placeholder, select.form-control::placeholder {
    color: #000 !important;
    opacity: 1;
}

/* Button enhancements */
.btn, .btn-lg {
    background-color: #b30000;
    border-color: #b30000;
    color: #fff;
    transition: background-color 0.3s ease;
}
.btn:hover, .btn-lg:hover { background-color: #e60000; border-color: #e60000; color: #fff; }
.btn-lg { padding: 12px 24px; font-size: 1.1rem; }

/* Alerts */
.alert {
    background-color: #ffe6e6;
    border-color: #b30000;
    color: #b30000;
    border-radius: 8px;
}

/* Card enhancements */
.card {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(179, 0, 0, 0.2);
    background-color: #fff0f0;
    color: #b30000;
}
.card-header {
    border-radius: 12px 12px 0 0 !important;
    background-color: #b30000 !important;
    color: #fff !important;
}

/* Accordion */
.accordion-button {
    border-radius: 8px;
    color: #b30000;
    background-color: #fff;
    border: 1px solid #b30000;
}
.accordion-button:not(.collapsed) {
    background-color: #b30000 !important;
    color: #fff !important;
}

/* Image */
.img-fluid { border-radius: 8px; }

/* Buttons */
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(179, 0, 0, 0.2); }

/* File input */
.form-control[type="file"] {
    padding: 10px;
    border: 2px dashed #b30000;
    border-radius: 8px;
    background: rgba(255, 230, 230, 0.5);
}
.form-control[type="file"]:hover { border-color: #e60000; background: rgba(230, 0, 0, 0.1); }

/* Dark theme */
[data-bs-theme="dark"] .bg-dark { background-color: #fff !important; color: #b30000 !important; }
[data-bs-theme="dark"] .card { background-color: #fff0f0 !important; color: #b30000 !important; }
[data-bs-theme="dark"] .modal-content { background-color: #fff0f0 !important; color: #b30000 !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fff0f0; }
::-webkit-scrollbar-thumb { background: #b30000; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #e60000; }

/* Body */
body { background-color: #fff !important; color: #b30000 !important; }

/* Navbar title - desktop */
.navbar-brand h1 {
    font-size: 1rem;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
}
@media (min-width: 768px) {
    .navbar-brand h1 { font-size: 1.5rem; }
}

/* Icon links for mobile navbar */
.nav-link.d-flex.d-lg-none {
    color: white;
    padding: 0.2rem 0.5rem;
    font-size: 1.3rem;
}
.nav-link.d-flex.d-lg-none:hover { color: #ffc0c0; }

/* Footer text */
.footer-text p {
    white-space: nowrap;
}

/* Responsive text */
@media (max-width: 576px) {
    /* Jewel section centering */
    .jewel-preview {
        display: flex;
        justify-content: center;
    }
    .jewel-preview .row {
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 8px;
    }
    .jewel-preview .col-3 {
        flex: 1;
        max-width: 25%;
        text-align: center;
        padding: 0 2px;
    }
    .jewel-icon-container i { font-size: 1.5rem !important; }
    .jewel-icon-container small {
        white-space: nowrap;
        font-size: 0.75rem;
        display: block;
        text-align: center;
        margin-top: 2px;
    }

    /* Footer font size smaller */
    .footer-text p { font-size: 0.85rem; }
}
