:root {
    --common-color: #95a5a6;
    --uncommon-color: #78c2ad;
    --rare-color: #3498db;
    --epic-color: #9b59b6;
    --legendary-color: #f1c40f;
    --mythic-color: #e74c3c;
    --ancient-color: #d35400;
    --divine-color: #c0392b;
    --celestial-color: #8e44ad;
    --transcendent-color: #2c3e50;
    --ethereal-color: #16a085;
    --cosmic-color: #2980b9;
    --omnipotent-color: #8e44ad;
    --infinite-color: #c0392b;
    --ultimate-color: #e67e22;
    --absolute-color: #d35400;
    --perfect-color: #f39c12;
    --god-color: #ff00ff;
    --background-color: #f8f9fa;
    --card-color: #ffffff;
    --text-color: #212529;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

header {
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #333;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 10px;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.current-user {
    font-size: 1rem;
    color: #3498db;
    font-weight: 600;
}

.logout-button {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.modal-button-secondary {
    width: 100%;
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
    border-radius: 25px;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.modal-button-secondary:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* 레벨업 모달 */
.levelup-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 50px 40px;
    max-width: 400px;
}

.levelup-animation {
    animation: levelupBounce 0.6s ease;
}

@keyframes levelupBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.levelup-star {
    font-size: 4rem;
    animation: levelupRotate 2s linear infinite;
    margin-bottom: 10px;
}

@keyframes levelupRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.levelup-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: levelupPulse 1.5s ease infinite;
}

@keyframes levelupPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.levelup-level {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #f093fb, #f5576c, #ffd700);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: levelupGradient 2s ease infinite;
}

@keyframes levelupGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.levelup-message {
    font-size: 1.1rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.levelup-bonus {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 30px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.levelup-content .modal-button {
    background: white;
    color: #667eea;
    font-weight: 900;
    margin-top: 10px;
}

.levelup-content .modal-button:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-content h2 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 10px;
}

.modal-info {
    text-align: center;
    color: #3498db;
    font-size: 0.85rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.modal-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s;
    margin-bottom: 20px;
}

.modal-input:focus {
    outline: none;
    border-color: #ff7e5f;
}

.modal-button {
    width: 100%;
    background: linear-gradient(145deg, #ff7e5f, #feb47b);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 126, 95, 0.4);
}

.modal-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-close:hover {
    color: #333;
}

/* 확률표 그리드 */
.probability-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.probability-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-radius: 10px;
    font-weight: 600;
}

.prob-name {
    font-size: 1rem;
}

.prob-value {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Luck Up 시스템 */
.luck-up-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    color: white;
}

.luck-up-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 700;
}

.luck-level {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    height: 30px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.5);
}

.progress-text {
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.luck-bonus {
    text-align: center;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 10px;
    font-weight: 600;
}

.luck-up-animation {
    animation: luckUpPulse 1s ease;
}

@keyframes luckUpPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(240, 147, 251, 0.8); }
}

/* 버튼 그룹 */
.gacha-button {
    background: linear-gradient(145deg, #ff7e5f, #feb47b);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(255, 126, 95, 0.3);
    margin: 10px 0;
}

.gacha-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 126, 95, 0.4);
}

.gacha-button:active {
    transform: translateY(0);
}

.gacha-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-group {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 10px 0 20px;
}

.secondary-button {
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.secondary-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.result-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    min-height: 500px;
    background-color: var(--card-color);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin: 20px 0;
}

.result-container.loading .dog-image {
    opacity: 0.3;
    filter: blur(5px);
}

.result-container.loading .dog-info {
    opacity: 0.3;
}

@keyframes cardAppear {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.dog-image-container {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.dog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.result-container:hover .dog-image {
    transform: scale(1.05);
}

.rarity-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    border-radius: 30px;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.rarity-badge.common { background-color: var(--common-color); }
.rarity-badge.uncommon { background-color: var(--uncommon-color); }
.rarity-badge.rare { background-color: var(--rare-color); }
.rarity-badge.epic { background-color: var(--epic-color); }
.rarity-badge.legendary { 
    background-color: var(--legendary-color);
    animation: legendaryPulse 2s infinite;
}
.rarity-badge.mythic { 
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    animation: mythicGlow 2s infinite;
}
.rarity-badge.ancient { 
    background: linear-gradient(45deg, #d35400, #e67e22);
    animation: ancientShine 2s infinite;
}
.rarity-badge.divine { 
    background: linear-gradient(45deg, #c0392b, #8e44ad);
    animation: divineAura 2s infinite;
}
.rarity-badge.celestial { 
    background: linear-gradient(45deg, #8e44ad, #2980b9);
    animation: celestialRadiance 2s infinite;
}
.rarity-badge.transcendent { 
    background: linear-gradient(90deg, #2c3e50, #34495e, #2c3e50);
    background-size: 200% 200%;
    animation: transcendentFlow 3s infinite;
}
.rarity-badge.ethereal { 
    background: linear-gradient(45deg, #16a085, #1abc9c);
    animation: etherealShimmer 2s infinite;
}
.rarity-badge.cosmic { 
    background: linear-gradient(90deg, #2980b9, #3498db, #9b59b6);
    background-size: 200% 200%;
    animation: cosmicWave 3s infinite;
}
.rarity-badge.omnipotent { 
    background: linear-gradient(90deg, #8e44ad, #c0392b, #f39c12);
    background-size: 200% 200%;
    animation: omnipotentPower 3s infinite;
}
.rarity-badge.infinite { 
    background: linear-gradient(90deg, #c0392b, #e74c3c, #f39c12, #f1c40f);
    background-size: 300% 300%;
    animation: infiniteSpectrum 4s infinite;
}
.rarity-badge.ultimate { 
    background: linear-gradient(90deg, #e67e22, #d35400, #c0392b, #8e44ad);
    background-size: 300% 300%;
    animation: ultimateEnergy 4s infinite;
}
.rarity-badge.absolute { 
    background: linear-gradient(90deg, #d35400, #e67e22, #f39c12, #f1c40f, #e67e22, #d35400);
    background-size: 400% 400%;
    animation: absoluteReality 5s infinite;
}
.rarity-badge.perfect { 
    background: linear-gradient(45deg, #f39c12, #f1c40f, #ffffff, #f1c40f, #f39c12);
    background-size: 400% 400%;
    animation: perfectHarmony 5s infinite;
}
.rarity-badge.god { 
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff, #ffff00, #ff00ff);
    background-size: 400% 400%;
    animation: godlyPresence 3s infinite;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.8);
}

@keyframes legendaryPulse {
    0% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(241, 196, 15, 0); }
    100% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0); }
}

@keyframes mythicGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(231, 76, 60, 0.8); }
    50% { box-shadow: 0 0 40px rgba(231, 76, 60, 0.4); }
}

@keyframes ancientShine {
    0%, 100% { box-shadow: 0 0 20px rgba(211, 84, 0, 0.8); }
    50% { box-shadow: 0 0 40px rgba(230, 126, 34, 0.8); }
}

@keyframes divineAura {
    0%, 100% { box-shadow: 0 0 30px rgba(142, 68, 173, 0.8); }
    50% { box-shadow: 0 0 50px rgba(192, 57, 43, 0.8); }
}

@keyframes celestialRadiance {
    0%, 100% { box-shadow: 0 0 40px rgba(142, 68, 173, 1); }
    50% { box-shadow: 0 0 60px rgba(41, 128, 185, 1); }
}

@keyframes transcendentFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes etherealShimmer {
    0%, 100% { box-shadow: 0 0 50px rgba(22, 160, 133, 1); }
    50% { box-shadow: 0 0 70px rgba(26, 188, 156, 1); }
}

@keyframes cosmicWave {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes omnipotentPower {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes infiniteSpectrum {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes ultimateEnergy {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes absoluteReality {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes perfectHarmony {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes godlyPresence {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.dog-info {
    width: 100%;
    text-align: center;
    transition: opacity 0.3s ease;
}

.dog-breed {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.dog-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    margin-top: 20px;
}

.stat-item {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.loader {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ranking-list {
    max-height: 400px;
    overflow-y: auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    transition: transform 0.2s;
}

.ranking-item:hover {
    transform: translateX(5px);
}

.ranking-item.my-rank {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.ranking-item.rank-1 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-weight: 700;
}

.ranking-item.rank-2 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-weight: 700;
}

.ranking-item.rank-3 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    font-weight: 700;
}

.rank-number {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.rank-nickname {
    flex: 1;
    font-size: 1rem;
    padding: 0 15px;
    text-align: left;
}

.rank-rarity {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    min-width: 100px;
    text-align: center;
}

.rank-pulls {
    font-size: 0.8rem;
    color: #888;
    min-width: 80px;
    text-align: right;
}

.ranking-item.my-rank .rank-pulls {
    color: rgba(255, 255, 255, 0.8);
}

.ranking-item.rank-1 .rank-pulls,
.ranking-item.rank-2 .rank-pulls,
.ranking-item.rank-3 .rank-pulls {
    color: rgba(255, 255, 255, 0.8);
}

.rarity-item.common { background-color: rgba(149, 165, 166, 0.2); }
.rarity-item.uncommon { background-color: rgba(120, 194, 173, 0.2); }
.rarity-item.rare { background-color: rgba(52, 152, 219, 0.2); }
.rarity-item.epic { background-color: rgba(155, 89, 182, 0.2); }
.rarity-item.legendary { background-color: rgba(241, 196, 15, 0.2); }
.rarity-item.mythic { background-color: rgba(231, 76, 60, 0.2); }
.rarity-item.ancient { background-color: rgba(211, 84, 0, 0.2); }
.rarity-item.divine { background-color: rgba(192, 57, 43, 0.2); }
.rarity-item.celestial { background-color: rgba(142, 68, 173, 0.2); }
.rarity-item.transcendent { background-color: rgba(44, 62, 80, 0.2); }
.rarity-item.ethereal { background-color: rgba(22, 160, 133, 0.2); }
.rarity-item.cosmic { background-color: rgba(41, 128, 185, 0.2); }
.rarity-item.omnipotent { background-color: rgba(142, 68, 173, 0.3); }
.rarity-item.infinite { background-color: rgba(192, 57, 43, 0.3); }
.rarity-item.ultimate { background-color: rgba(230, 126, 34, 0.3); }
.rarity-item.absolute { background-color: rgba(211, 84, 0, 0.3); }
.rarity-item.perfect { background-color: rgba(243, 156, 18, 0.3); }
.rarity-item.god { background-color: rgba(255, 0, 255, 0.2); }

.probability-item.common { background-color: rgba(149, 165, 166, 0.2); }
.probability-item.uncommon { background-color: rgba(120, 194, 173, 0.2); }
.probability-item.rare { background-color: rgba(52, 152, 219, 0.2); }
.probability-item.epic { background-color: rgba(155, 89, 182, 0.2); }
.probability-item.legendary { background-color: rgba(241, 196, 15, 0.2); }
.probability-item.mythic { background-color: rgba(231, 76, 60, 0.2); }
.probability-item.ancient { background-color: rgba(211, 84, 0, 0.2); }
.probability-item.divine { background-color: rgba(192, 57, 43, 0.2); }
.probability-item.celestial { background-color: rgba(142, 68, 173, 0.2); }
.probability-item.transcendent { background-color: rgba(44, 62, 80, 0.2); }
.probability-item.ethereal { background-color: rgba(22, 160, 133, 0.2); }
.probability-item.cosmic { background-color: rgba(41, 128, 185, 0.2); }
.probability-item.omnipotent { background-color: rgba(142, 68, 173, 0.3); }
.probability-item.infinite { background-color: rgba(192, 57, 43, 0.3); }
.probability-item.ultimate { background-color: rgba(230, 126, 34, 0.3); }
.probability-item.absolute { background-color: rgba(211, 84, 0, 0.3); }
.probability-item.perfect { background-color: rgba(243, 156, 18, 0.3); }
.probability-item.god { background-color: rgba(255, 0, 255, 0.2); }

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 1000;
    top: -10px;
    border-radius: 50%;
    pointer-events: none;
}

.stats-section {
    width: 100%;
    max-width: 700px;
    margin-top: 30px;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.stats-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-box {
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-text {
    font-size: 0.75rem;
    color: #888;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2rem;
    }

    .user-info {
        flex-direction: column;
        gap: 8px;
    }

    .ranking-item {
        flex-wrap: wrap;
    }

    .rank-pulls {
        width: 100%;
        text-align: left;
        margin-top: 5px;
        padding-left: 55px;
    }

    .button-group {
        gap: 10px;
    }

    .gacha-button {
        width: 90%;
        max-width: 300px;
    }

    .secondary-button {
        flex: 1;
        min-width: 120px;
    }

    .modal-content {
        padding: 25px;
        width: 95%;
    }

    .luck-up-section {
        padding: 15px;
        font-size: 0.9rem;
    }

    .luck-up-title {
        font-size: 1rem;
    }

    .progress-bar-container {
        height: 25px;
    }
}