/* ============================================
   PROFIL.CSS - Page Profil Gaming Theme
   ============================================ */

/* ---- Reset & Variables ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #888;
    --text-muted: #555;
    --border-color: #222;
    --color-common: #888;
    --color-uncommon: #c9a66b;
    --color-rare: #d4af37;
    --color-epic: #9b59b6;
    --color-legendary: #f39c12;
    --color-ultra: #d4af37;
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Loading Screen ---- */
#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 1px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid #222;
    border-top-color: var(--color-rare);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Error Screen ---- */
#error-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.btn-back {
    display: inline-block;
    padding: 10px 24px;
    background: #1a1a1a;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

/* ---- Main Layout ---- */
#profile-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px 60px;
}

/* ---- Navigation ---- */
.profile-nav {
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-primary);
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
    transition: color 0.2s;
}

.nav-back:hover {
    color: var(--text-primary);
}

/* ---- Profile Header ---- */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0 40px;
    gap: 8px;
}

.profile-photo-container {
    margin-bottom: 12px;
}

.profile-photo-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid var(--color-rare);
    cursor: pointer;
    background: #1a1a1a;
}

.profile-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.profile-photo-wrapper img.loaded {
    display: block;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 600;
    color: var(--color-rare);
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.profile-photo-wrapper:hover .photo-overlay {
    opacity: 1;
}

#profile-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.profile-title {
    font-size: 14px;
    color: var(--color-rare);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    min-height: 20px;
}

.profile-bio {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.5;
    min-height: 20px;
}

.btn-edit {
    margin-top: 8px;
    padding: 8px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid #333;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-family);
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.btn-edit:hover {
    border-color: var(--color-rare);
    color: var(--color-rare);
}

/* ---- Modals ---- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 400px;
    z-index: 1;
}

.modal-content h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.modal-content label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.modal-content input[type="text"],
.modal-content textarea {
    width: 100%;
    padding: 10px 14px;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-family);
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
    resize: none;
}

.modal-content input[type="text"]:focus,
.modal-content textarea:focus {
    border-color: var(--color-rare);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 4px;
}

.btn-primary {
    padding: 10px 24px;
    background: var(--color-rare);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
    padding: 10px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: #555;
    color: var(--text-primary);
}

/* ---- Achievements Summary ---- */
.achievements-summary {
    padding: 0 0 30px;
}

.summary-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.summary-count {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.summary-count span {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 400;
}

.summary-info {
    flex: 1;
}

.summary-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.summary-bar {
    width: 100%;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
}

.summary-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--color-rare), var(--color-legendary));
    transition: width 0.6s ease-out;
}

.summary-percentage {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-rare);
}

/* ---- Section Titles ---- */
.section-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* ---- Tier Sections ---- */
.tier-section {
    margin-bottom: 50px;
}

.tier-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.tier-name {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.tier-count {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-left: auto;
}

.badges-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* ---- Badge Card ---- */
.badge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.badge-card:hover {
    transform: translateY(-2px);
}

.badge-visual {
    position: relative;
}

.badge-name {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    max-width: 100px;
    line-height: 1.4;
}

/* ---- Progress Bar ---- */
.progress-bar {
    width: 70px;
    height: 3px;
    background: #222;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar.large {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    margin: 12px 0 4px;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease-out;
}

.progress-fill.common { background: var(--color-common); }
.progress-fill.uncommon { background: var(--color-uncommon); }
.progress-fill.rare { background: var(--color-rare); }
.progress-fill.epic { background: var(--color-epic); }
.progress-fill.legendary { background: linear-gradient(90deg, var(--color-legendary), #f1c40f); }
.progress-fill.ultra { background: linear-gradient(90deg, #a67c00, var(--color-ultra), #f4e4a6); }

.progress-text {
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ---- Rarity Tag ---- */
.rarity-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 8px 0;
}

.rarity-tag.common { background: #222; color: var(--color-common); }
.rarity-tag.uncommon { background: rgba(201, 166, 107, 0.15); color: var(--color-uncommon); }
.rarity-tag.rare { background: rgba(212, 175, 55, 0.15); color: var(--color-rare); }
.rarity-tag.epic { background: rgba(155, 89, 182, 0.15); color: var(--color-epic); }
.rarity-tag.legendary { background: rgba(243, 156, 18, 0.15); color: var(--color-legendary); }
.rarity-tag.ultra { background: rgba(212, 175, 55, 0.2); color: #f4e4a6; }

/* ============================================
   BADGE TIERS - Common
   ============================================ */
.tier-common .tier-name { color: var(--color-common); }
.tier-common .badge-name { color: #666; }

.badge-common {
    width: 80px;
    height: 80px;
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.badge-common svg {
    width: 36px;
    height: 36px;
}

/* ============================================
   BADGE TIERS - Uncommon
   ============================================ */
.tier-uncommon .tier-name { color: var(--color-uncommon); }
.tier-uncommon .badge-name { color: #a08050; }

.badge-uncommon {
    width: 82px;
    height: 82px;
    background: linear-gradient(145deg, #1c1a17 0%, #0d0c0a 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(201, 166, 107, 0.3);
    box-shadow: 0 6px 22px rgba(0,0,0,0.45), 0 0 10px rgba(201, 166, 107, 0.04);
}

.badge-uncommon svg {
    width: 37px;
    height: 37px;
}

/* ============================================
   BADGE TIERS - Rare
   ============================================ */
.tier-rare .tier-name { color: var(--color-rare); }
.tier-rare .badge-name { color: #a08030; }

.badge-rare {
    width: 90px;
    height: 90px;
    background: linear-gradient(145deg, #1f1f1f 0%, #0a0a0a 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 15px rgba(212, 175, 55, 0.05);
}

.badge-rare::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 17px;
    background: linear-gradient(145deg, #181818 0%, #080808 100%);
}

.badge-rare svg {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
}

/* ============================================
   BADGE TIERS - Epic
   ============================================ */
.tier-epic .tier-name {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.tier-epic .badge-name { color: var(--color-epic); }

.badge-epic-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-epic-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background: radial-gradient(circle, rgba(155, 89, 182, 0.15) 0%, transparent 70%);
    animation: pulseEpic 3s ease-in-out infinite;
}

@keyframes pulseEpic {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.badge-epic {
    width: 90px;
    height: 90px;
    background: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 25px rgba(155, 89, 182, 0.08);
}

.badge-epic::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 24px;
    background: linear-gradient(145deg, #9b59b6, #6c3483, #9b59b6);
    z-index: -1;
}

.badge-epic::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 19px;
    background: linear-gradient(145deg, #141414 0%, #0a0a0a 100%);
}

.badge-epic svg {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 0 4px rgba(155, 89, 182, 0.3));
}

/* ============================================
   BADGE TIERS - Legendary
   ============================================ */
.tier-legendary .tier-name {
    background: linear-gradient(90deg, #f39c12, #f1c40f, #f39c12);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s ease-in-out infinite;
}

@keyframes shimmerText {
    0%, 100% { background-position: -200% center; }
    50% { background-position: 200% center; }
}

.tier-legendary .badge-name {
    background: linear-gradient(180deg, #f1c40f 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-legendary-wrapper {
    position: relative;
    width: 115px;
    height: 115px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legendary-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 26px;
    background: conic-gradient(from 0deg, transparent, rgba(243, 156, 18, 0.25), rgba(241, 196, 15, 0.4), rgba(243, 156, 18, 0.25), transparent, transparent);
    animation: rotateLeg 6s linear infinite;
    filter: blur(3px);
}

@keyframes rotateLeg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.legendary-particles {
    position: absolute;
    width: 100px;
    height: 100px;
}

.leg-p {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #f1c40f;
    border-radius: 50%;
    box-shadow: 0 0 4px #f39c12;
    animation: twinkleL 2.5s ease-in-out infinite;
}

.leg-p:nth-child(1) { top: 0; left: 50%; animation-delay: 0s; }
.leg-p:nth-child(2) { top: 20%; right: 10%; animation-delay: 0.4s; }
.leg-p:nth-child(3) { bottom: 20%; right: 10%; animation-delay: 0.8s; }
.leg-p:nth-child(4) { bottom: 0; left: 50%; animation-delay: 1.2s; }
.leg-p:nth-child(5) { bottom: 20%; left: 10%; animation-delay: 1.6s; }
.leg-p:nth-child(6) { top: 20%; left: 10%; animation-delay: 2s; }

@keyframes twinkleL {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.badge-legendary {
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, #1a1a1a 0%, #000 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid transparent;
    box-shadow: 0 12px 35px rgba(0,0,0,0.7), 0 0 30px rgba(243, 156, 18, 0.1);
}

.badge-legendary::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: linear-gradient(145deg, #f39c12, #c27c0e, #f1c40f, #f39c12);
    background-size: 300% 300%;
    animation: borderPulse 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes borderPulse {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.badge-legendary::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 20px;
    background: linear-gradient(145deg, #121212 0%, #080808 100%);
}

.badge-legendary svg {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    filter: drop-shadow(0 0 6px rgba(243, 156, 18, 0.4));
}

/* ============================================
   BADGE TIERS - Ultra
   ============================================ */
.tier-ultra .tier-name {
    background: linear-gradient(90deg, #a67c00, #f4e4a6, #d4af37, #f4e4a6, #a67c00);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerUltra 4s ease-in-out infinite;
}

@keyframes shimmerUltra {
    0%, 100% { background-position: -300% center; }
    50% { background-position: 300% center; }
}

.tier-ultra .badge-name {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    background: linear-gradient(180deg, #f4e4a6 0%, #d4af37 50%, #a67c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-ultra-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ultra-glow-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    background: conic-gradient(from 0deg, transparent, rgba(212, 175, 55, 0.35), rgba(244, 228, 166, 0.5), rgba(212, 175, 55, 0.35), transparent, transparent, transparent, transparent);
    animation: rotateU 4s linear infinite;
    filter: blur(6px);
}

@keyframes rotateU {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ultra-particles {
    position: absolute;
    width: 125px;
    height: 125px;
    animation: rotateU 10s linear infinite reverse;
}

.ultra-p {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #f4e4a6;
    border-radius: 50%;
    box-shadow: 0 0 6px #d4af37, 0 0 10px #d4af37;
    animation: twinkleU 2s ease-in-out infinite;
}

.ultra-p:nth-child(1) { top: 0; left: 50%; animation-delay: 0s; }
.ultra-p:nth-child(2) { top: 15%; right: 15%; animation-delay: 0.25s; }
.ultra-p:nth-child(3) { top: 50%; right: 0; animation-delay: 0.5s; }
.ultra-p:nth-child(4) { bottom: 15%; right: 15%; animation-delay: 0.75s; }
.ultra-p:nth-child(5) { bottom: 0; left: 50%; animation-delay: 1s; }
.ultra-p:nth-child(6) { bottom: 15%; left: 15%; animation-delay: 1.25s; }
.ultra-p:nth-child(7) { top: 50%; left: 0; animation-delay: 1.5s; }
.ultra-p:nth-child(8) { top: 15%; left: 15%; animation-delay: 1.75s; }

@keyframes twinkleU {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.badge-ultra {
    width: 115px;
    height: 115px;
    background: linear-gradient(145deg, #1a1a1a 0%, #000 100%);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 18px 45px rgba(0,0,0,0.8), 0 0 45px rgba(212, 175, 55, 0.15);
}

.badge-ultra::before {
    content: '';
    position: absolute;
    inset: -2.5px;
    border-radius: 31px;
    background: linear-gradient(145deg, #d4af37, #a67c00, #d4af37, #f4e4a6, #d4af37);
    background-size: 400% 400%;
    animation: ultraBorder 5s ease-in-out infinite;
    z-index: -1;
}

@keyframes ultraBorder {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

.badge-ultra::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 23px;
    background: linear-gradient(145deg, #111 0%, #050505 100%);
}

.ultra-inner {
    position: absolute;
    width: 88px;
    height: 88px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    z-index: 1;
}

.badge-ultra svg {
    position: relative;
    z-index: 2;
    width: 52px;
    height: 52px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

/* ============================================
   BADGE LOCKED STATE
   ============================================ */
.badge-locked .badge-visual {
    filter: grayscale(1) brightness(0.4);
    opacity: 0.5;
}

.badge-locked .badge-name {
    color: #444 !important;
    -webkit-text-fill-color: #444 !important;
}

.badge-locked .progress-text {
    color: #333;
}

.badge-locked:hover {
    transform: none;
}

/* Lock overlay */
.lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.lock-overlay svg {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* Disable animations for locked badges */
.badge-locked .badge-epic-glow,
.badge-locked .legendary-ring,
.badge-locked .legendary-particles,
.badge-locked .ultra-glow-ring,
.badge-locked .ultra-particles {
    animation: none;
    opacity: 0;
}

/* ============================================
   BADGE DETAIL MODAL
   ============================================ */
.badge-detail-modal {
    text-align: center;
    max-width: 340px;
}

.badge-detail-modal h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-top: 16px;
}

.badge-detail-modal p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.5;
}

#badge-modal-visual {
    display: flex;
    justify-content: center;
}

#badge-modal-progress-wrap {
    margin: 16px 0 8px;
}

#badge-modal-progress-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
    padding-top: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-card-icon.orders { background: rgba(52, 152, 219, 0.15); }
.stat-card-icon.mep { background: rgba(243, 156, 18, 0.15); }
.stat-card-icon.memos { background: rgba(46, 204, 113, 0.15); }
.stat-card-icon.rnd { background: rgba(155, 89, 182, 0.15); }
.stat-card-icon.hygiene { background: rgba(26, 188, 156, 0.15); }

.stat-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.stat-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-row-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-row-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    #profile-page {
        padding: 0 12px 40px;
    }

    .badges-row {
        gap: 16px;
        justify-content: center;
    }

    .badge-common,
    .badge-uncommon {
        width: 68px;
        height: 68px;
    }

    .badge-common svg,
    .badge-uncommon svg {
        width: 30px;
        height: 30px;
    }

    .badge-rare {
        width: 76px;
        height: 76px;
    }

    .badge-rare svg {
        width: 34px;
        height: 34px;
    }

    .badge-epic-wrapper {
        width: 86px;
        height: 86px;
    }

    .badge-epic {
        width: 76px;
        height: 76px;
    }

    .badge-epic svg {
        width: 36px;
        height: 36px;
    }

    .badge-legendary-wrapper {
        width: 100px;
        height: 100px;
    }

    .badge-legendary {
        width: 86px;
        height: 86px;
    }

    .badge-legendary svg {
        width: 40px;
        height: 40px;
    }

    .badge-ultra-wrapper {
        width: 120px;
        height: 120px;
    }

    .badge-ultra {
        width: 100px;
        height: 100px;
    }

    .badge-ultra svg {
        width: 44px;
        height: 44px;
    }

    .badge-name {
        font-size: 9px;
        max-width: 80px;
    }

    .progress-bar {
        width: 60px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .summary-container {
        flex-wrap: wrap;
    }

    .summary-count {
        font-size: 28px;
    }
}

@media (max-width: 400px) {
    .badges-row {
        gap: 12px;
    }
}
