.rimuru-app {
    --bg: #0f1117;
    --card: #14151b;
    --text: #fff;
    --muted: #9aa0a6;
    --accent: #4effff;
    --accent-glow: rgba(78, 255, 255, 0.3);
    --danger: #e74c3c;
    --tier-x: #ff4d4d;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px;
    box-sizing: border-box;
}


.rimuru-app .topbar {
    text-align: center;
    margin-bottom: 50px;
}

.rimuru-app .brand .title {
    font-weight: 800;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to bottom, #fff, #9aa0a6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    line-height: 1.2;
}

.rimuru-app .brand .sub {
    font-size: .9rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-top: 5px;
    opacity: 0.8;
}

.rimuru-app .rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

/* Base Card State (Visible) */
.rimuru-app .reward-card {
    position: relative;
    background: #1a1c24;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 18px;
    padding: 24px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    overflow: hidden;
    box-shadow: var(--shadow);
    opacity: 1;
    transform: translateY(0);
}

.rimuru-app .reward-card.is-processing {
    pointer-events: none;
}

.rimuru-app .reward-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    pointer-events: none;
}

.rimuru-app .reward-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(78, 255, 255, 0.3);
}

/* Entrance Animations (Applied via JS only on first load) */
.rimuru-app .reward-card.animate-entrance {
    opacity: 0;
    transform: translateY(40px); 
    animation: slideUpFadeIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.rimuru-app .reward-card.claimed.animate-entrance {
    opacity: 0;
    transform: translateY(40px);
    animation: slideUpFadeInClaimed 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.rimuru-app .reward-card.active.animate-entrance {
    animation: slideUpFadeIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, float 3s ease-in-out infinite 0.8s;
}

/* Base Active State */
.rimuru-app .reward-card.active {
    border-color: var(--accent);
    background: radial-gradient(circle at top, #1e2a30, #14151b);
    animation: float 3s ease-in-out infinite;
}

.rimuru-app .reward-card.active::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: var(--accent);
    z-index: -1;
    opacity: 0.15;
    filter: blur(10px);
}

.rimuru-app .reward-card.active .day-label {
    background: rgba(78, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

/* Base Claimed State */
.rimuru-app .reward-card.claimed {
    filter: grayscale(0.8);
    cursor: default;
    opacity: 0.4;
}

.rimuru-app .claimed-overlay {
    position: absolute;
    top: 10px; right: 10px;
    color: var(--accent);
    display: none;
    font-weight: 700;
}

.rimuru-app .reward-card.claimed .claimed-overlay { 
    display: block; 
}

/* Tier X State */
.rimuru-app .reward-card.tier-x {
    border-color: var(--tier-x);
    background: linear-gradient(180deg, #251010 0%, #14151b 100%);
}

.rimuru-app .reward-card.tier-x .day-label { 
    color: var(--tier-x); 
    border-color: var(--tier-x); 
}

.rimuru-app .reward-card.tier-x .reward-amount { 
    color: var(--tier-x); 
    text-shadow: 0 0 10px rgba(255,77,77,0.3); 
}

/* Internal Card Elements */
.rimuru-app .day-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
}

.rimuru-app .icon-container {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
    line-height: 1;
}
.rimuru-app .reward-img-icon {
    height: 64px;
    object-fit: contain;
}
.rimuru-app .reward-card:hover .icon-container {
    transform: scale(1.2) rotate(5deg);
}

.rimuru-app .reward-amount { 
    font-weight: 700; 
    font-size: 1.1rem; 
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
}

.rimuru-app .reward-name { 
    font-size: 0.75rem; 
    color: var(--muted); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

/* Claiming Interaction */
.rimuru-app .claiming {
    animation: successPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

/* Keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes slideUpFadeIn {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUpFadeInClaimed {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 0.4; transform: translateY(0); }
}

@keyframes successPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); filter: brightness(2); }
    100% { transform: scale(1); }
}

@media (max-width: 600px) {
    .rimuru-app .rewards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .rimuru-app .brand .title { font-size: 1.8rem; }
    .rimuru-app { padding: 50px 20px; }
}

/* =========================================
   THE SPOTLIGHT REVEAL (Replaces Dialog Box) 
   ========================================= */

   .rimuru-app .tdr-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(8, 10, 14, 0.95); /* Darker, almost pitch black */
    backdrop-filter: blur(12px); /* Stronger blur to melt away the website behind it */
    z-index: 999999;
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif !important;
}

.rimuru-app .tdr-modal-content {
    background: transparent !important; /* Removes the dialog box completely */
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    text-align: center;
    max-width: 500px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rimuru-app .tdr-modal-header {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInDown 0.6s ease forwards 0.2s;
}

.rimuru-app #tdr-modal-img {
    max-width: 100%;
    height: 400px; /* Much larger card focus */
    object-fit: contain;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 50px rgba(78, 255, 255, 0.4)); /* Massive cinematic glow */
    opacity: 0;
    transform: scale(0.8);
    animation: gachaPop 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.rimuru-app .tdr-modal-tier {
    font-weight: 600;
    color: #ffffff87 !important;
    font-size: 1.0rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards 0.4s; /* Staggered entrance */
}

.rimuru-app .tdr-modal-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4effff !important;
    margin-bottom: 40px;
    text-shadow: 0 4px 20px rgba(78, 255, 255, 0.4);
    line-height: 1.2; 
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards 0.5s; 
    
    width: 100%;
    white-space: normal; 
    overflow-wrap: break-word; 
    word-break: break-word; 
}

/* Minimalist floating pill button */
.rimuru-app .tdr-modal-btn {
    background: transparent !important;
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    padding: 12px 40px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 50px !important; /* Pill shape */
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards 0.7s; /* Appears last */
}

.rimuru-app .tdr-modal-btn:hover {
    border-color: #4effff !important;
    background: rgba(78, 255, 255, 0.1) !important;
    box-shadow: 0 0 20px rgba(78, 255, 255, 0.3) !important;
    transform: translateY(-3px);
}

/* --- New Cinematic Animations --- */
@keyframes gachaPop {
    0% { opacity: 0; transform: scale(0.8) translateY(40px); filter: brightness(2) blur(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: brightness(1) blur(0); }
}
@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}