:root {
    --bg-dark-primary: #121212;
    --bg-dark-secondary: #1a202c;
    --bg-card: #2a2a2a;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-primary: #00e5ff;
    --accent-secondary: #ff4081;
    --rank-gold: #ffd700;
    --rank-silver: #c0c0c0;
    --rank-bronze: #cd7f32;
}
html, body { font-family: 'Noto Sans JP', sans-serif; color: var(--text-primary); background: var(--bg-dark-secondary); }
body { min-height: 100vh; }
a { color: var(--accent-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-secondary); }
.main-header { background: rgba(26, 32, 44, 0.7); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.1); position: sticky; top: 0; z-index: 1000; }
.main-header .display-5 { font-weight: 900; color: #fff; text-shadow: 0 0 8px var(--accent-primary); }
.main-header .lead { color: var(--text-secondary); font-size: 1.2rem; }
.app-card { background-color: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; }
.app-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0, 229, 255, 0.15); }
.app-card .card-img-top { border-radius: 12px; margin: 1rem; width: calc(100% - 2rem); box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.app-card .card-body { padding: 0 1.25rem 1.25rem 1.25rem; }
.app-card .card-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.app-card .card-text { font-size: 0.85rem; color: var(--text-secondary); }
.ranking-badge { font-size: 1.5rem !important; font-weight: 900; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #1a202c; text-shadow: 0 1px 1px rgba(0,0,0,0.2); box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2); border: 2px solid rgba(255,255,255,0.5); }
.rank-1 { background: linear-gradient(135deg, #fceabb, var(--rank-gold)); }
.rank-2 { background: linear-gradient(135deg, #e6e9f0, var(--rank-silver)); }
.rank-3 { background: linear-gradient(135deg, #f0c2a2, var(--rank-bronze)); }
.rank-other { background: linear-gradient(135deg, #89f7fe, #66a6ff); }
.detail-card { background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; overflow: hidden; /* Added to fix border-radius issue */ }
.app-detail-icon { border-radius: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); max-width: 250px; height: auto; }
.detail-card .card-title { font-size: 2.5rem; font-weight: 900; color: #e0e0e0; }
.detail-card .lead { color: var(--text-secondary); }
.detail-badge { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); font-size: 0.9rem; padding: 0.5em 1em; border-radius: 20px; }
.chart-container {
    background-color: #2d3239;
    border: 1px solid #1a202c; /* Inset effect */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
    padding: 1.5rem;
    border-radius: 15px;
}
.description-box { background: rgba(0,0,0,0.2); padding: 1.5rem; border-radius: 15px; max-height: 400px; overflow-y: auto; color: var(--text-secondary); }
.btn-appstore { background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary)); color: #fff; font-weight: 700; border: none; border-radius: 12px; padding: 12px 30px; transition: transform 0.2s, box-shadow 0.2s; }
.btn-appstore:hover { transform: scale(1.05); box-shadow: 0 8px 25px rgba(0, 229, 255, 0.4); color: #fff; }
.btn-back { color: var(--text-secondary); border-color: var(--text-secondary); }
.btn-back:hover { color: #fff; background: var(--accent-primary); border-color: var(--accent-primary); }

.btn-back:hover { color: #fff; background: var(--accent-primary); border-color: var(--accent-primary); }

/* Refactored Update List Section */
.update-section-wrapper {
    position: relative; /* New wrapper for positioning context */
}
.update-list-container {
    max-height: 240px; /* Approx 3 items visible */
    overflow: hidden;
    transition: max-height 0.6s ease-in-out;
    border-radius: 15px; /* Ensures content clipping */
}
.update-list-container.expanded {
    max-height: 2800px; /* Generous height for all devices */
}
.update-list-item {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15) !important;
}
.update-list-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent);
    z-index: 2;
    pointer-events: none; /* Let clicks go through to the list items */
    transition: opacity 0.6s ease;
}
.update-list-container.expanded ~ .update-list-overlay {
    opacity: 0;
}
.update-button-wrapper {
    text-align: center;
    position: relative;
    z-index: 3; /* Button is on top of everything */
}
.btn-show-more {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
    font-weight: 700;
    border-radius: 12px;
    padding: 0.75rem 2.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-show-more:hover {
    color: #fff;
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.4);
}

footer { background: transparent; color: var(--text-secondary); font-size: 0.9rem; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark-secondary); }
::-webkit-scrollbar-thumb { background: #555; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }
