/* ================================================
   KULLANICI PANELİ - PUAN SİSTEMİ STİLLERİ
   ================================================ */

:root {
    --panel-bg: #0f0f1a;
    --panel-card: #1a1a2e;
    --panel-card2: #16213e;
    --panel-border: rgba(255,255,255,0.08);
    --panel-text: #e0e0e0;
    --panel-muted: #8892a4;
    --gold: #ffd600;
    --silver: #9e9e9e;
    --bronze: #cd7f32;
    --platinum: #00bcd4;
    --diamond: #2196f3;
    --master: #9c27b0;
    --legend: #f44336;
    --xp-bar: linear-gradient(90deg, #ffd600, #ff9800);
    --glow-gold: 0 0 20px rgba(255,214,0,0.4);
}

/* ── Panel Layout ─────────────────────────── */
.panel-wrapper {
    background: var(--panel-bg);
    min-height: 100vh;
    padding-bottom: 60px;
}

/* ── Hero Banner ──────────────────────────── */
.panel-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    padding: 50px 0 80px;
    position: relative;
    overflow: hidden;
}

.panel-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,214,0,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.panel-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--panel-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.panel-avatar-wrap {
    position: relative;
    display: inline-block;
}

.panel-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--gold);
    box-shadow: var(--glow-gold);
}

.panel-avatar-default {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a237e, #283593);
    border: 4px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--glow-gold);
}

/* Avatar çerçevesi - altın */
.panel-avatar-wrap.frame-altin .panel-avatar,
.panel-avatar-wrap.frame-altin .panel-avatar-default {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px #ff9800, var(--glow-gold);
}

/* Avatar çerçevesi - platin */
.panel-avatar-wrap.frame-platin .panel-avatar,
.panel-avatar-wrap.frame-platin .panel-avatar-default {
    border-color: var(--platinum);
    box-shadow: 0 0 0 3px #e0f7fa, 0 0 20px rgba(0,188,212,0.5);
}

.panel-level-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--panel-card);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 2px solid var(--gold);
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.panel-username {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.panel-username .vip-badge {
    background: linear-gradient(135deg, #ffd600, #ff9800);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.panel-level-name {
    font-size: 0.95rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 12px;
}

.panel-points-display {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.puan-big {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,214,0,0.1);
    border: 1px solid rgba(255,214,0,0.3);
    border-radius: 50px;
    padding: 8px 20px;
}

.puan-big .icon { font-size: 1.5rem; }
.puan-big .val { font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.puan-big .lbl { font-size: 0.75rem; color: var(--panel-muted); text-transform: uppercase; letter-spacing: 1px; }

.streak-display {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ff7043;
    font-weight: 700;
    font-size: 1rem;
}

/* ── XP Progress Bar ──────────────────────── */
.xp-section {
    margin-top: 15px;
    max-width: 480px;
}

.xp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--panel-muted);
    margin-bottom: 6px;
}

.xp-bar-outer {
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.xp-bar-inner {
    height: 100%;
    background: var(--xp-bar);
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 0 10px rgba(255,214,0,0.5);
}

/* ── Stat Cards ───────────────────────────── */
.panel-stats-row {
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.panel-stat-card {
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 22px 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.panel-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.panel-stat-card .stat-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
}

.panel-stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.panel-stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--panel-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Panel Cards ──────────────────────────── */
.p-card {
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}

.p-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
}

.p-card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.p-card-body {
    padding: 20px;
}

/* ── Daily Tasks ──────────────────────────── */
.task-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--panel-border);
}

.task-item:last-child { border-bottom: none; }

.task-icon {
    font-size: 1.5rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    flex-shrink: 0;
}

.task-info { flex: 1; min-width: 0; }

.task-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.task-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
}

.task-progress-fill.done { background: #4caf50; }
.task-progress-fill.in-progress { background: linear-gradient(90deg, #2196f3, #21cbf3); }

.task-reward {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 700;
    white-space: nowrap;
}

.task-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.task-check.done { background: #4caf50; color: #fff; }
.task-check.pending { background: rgba(255,255,255,0.1); color: var(--panel-muted); }

/* ── Activity Log ─────────────────────────── */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--panel-border);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-icon.plus { background: rgba(76,175,80,0.2); color: #4caf50; }
.activity-icon.badge { background: rgba(255,214,0,0.2); color: var(--gold); }
.activity-icon.task  { background: rgba(33,150,243,0.2); color: #2196f3; }

.activity-desc { font-size: 0.88rem; color: var(--panel-text); flex: 1; }
.activity-pts { font-size: 0.9rem; font-weight: 700; color: #4caf50; white-space: nowrap; }
.activity-time { font-size: 0.75rem; color: var(--panel-muted); margin-top: 2px; }

/* ── Badges Grid ──────────────────────────── */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 14px;
}

.badge-item {
    text-align: center;
    padding: 14px 8px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    background: rgba(255,255,255,0.03);
    transition: transform 0.2s, border-color 0.2s;
    cursor: default;
}

.badge-item.earned {
    border-color: rgba(255,214,0,0.4);
    background: rgba(255,214,0,0.06);
}

.badge-item.earned:hover {
    transform: scale(1.08);
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(255,214,0,0.2);
}

.badge-item.locked {
    opacity: 0.35;
    filter: grayscale(0.8);
}

.badge-emoji { font-size: 2rem; display: block; margin-bottom: 6px; }
.badge-name { font-size: 0.65rem; color: var(--panel-muted); line-height: 1.2; }
.badge-item.earned .badge-name { color: #ccc; }

/* ── Leaderboard ──────────────────────────── */
.leader-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--panel-border);
    transition: background 0.2s;
}

.leader-item:hover { background: rgba(255,255,255,0.06); }

.leader-item.me {
    background: rgba(255,214,0,0.08);
    border-color: rgba(255,214,0,0.3);
}

.leader-rank {
    font-size: 1.1rem;
    font-weight: 700;
    width: 32px;
    text-align: center;
    color: var(--panel-muted);
}

.leader-rank.r1 { color: var(--gold); font-size: 1.3rem; }
.leader-rank.r2 { color: var(--silver); }
.leader-rank.r3 { color: var(--bronze); }

.leader-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--panel-border);
}

.leader-name { font-size: 0.95rem; font-weight: 600; color: #fff; flex: 1; }
.leader-pts { font-size: 0.9rem; font-weight: 700; color: var(--gold); }
.leader-level { font-size: 0.75rem; color: var(--panel-muted); }

/* ── Market / Store ───────────────────────── */
.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.store-item {
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.store-item:hover {
    transform: translateY(-6px);
    border-color: rgba(255,214,0,0.4);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.store-item.owned {
    border-color: #4caf50;
    background: rgba(76,175,80,0.06);
}

.store-item-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.store-item-name { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.store-item-desc { font-size: 0.82rem; color: var(--panel-muted); margin-bottom: 16px; min-height: 40px; }

.store-item-cost {
    background: rgba(255,214,0,0.1);
    border: 1px solid rgba(255,214,0,0.3);
    border-radius: 50px;
    padding: 6px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 14px;
}

.btn-buy {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #1a237e, #283593);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-buy:hover { background: linear-gradient(135deg, #283593, #3949ab); }
.btn-buy:active { transform: scale(0.97); }
.btn-buy:disabled { background: rgba(255,255,255,0.1); color: var(--panel-muted); cursor: not-allowed; }
.btn-buy.owned { background: rgba(76,175,80,0.3); color: #4caf50; cursor: default; }

.store-duration-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(33,150,243,0.2);
    border: 1px solid rgba(33,150,243,0.4);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.7rem;
    color: #90caf9;
}

/* ── Nav Tabs ─────────────────────────────── */
.panel-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: wrap;
}

.panel-tabs::-webkit-scrollbar { display: none; }

.panel-tab {
    padding: 10px 18px;
    border-radius: 50px;
    border: 1px solid var(--panel-border);
    background: var(--panel-card);
    color: var(--panel-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-tab:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.panel-tab.active { background: linear-gradient(135deg, #1a237e, #283593); color: #fff; border-color: transparent; box-shadow: 0 4px 15px rgba(26,35,126,0.5); }

/* ── Quick Action Buttons ─────────────────── */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.qa-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    background: var(--panel-card);
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
}

.qa-btn:hover {
    color: var(--gold);
    border-color: rgba(255,214,0,0.4);
    background: rgba(255,214,0,0.06);
    text-decoration: none;
    transform: translateY(-2px);
}

.qa-btn span { font-size: 1.2rem; }

/* ── Leaderboard Full Page ────────────────── */
.leaderboard-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 20px 0;
}

.podium-item {
    text-align: center;
    flex: 1;
    max-width: 160px;
}

.podium-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 8px;
    display: block;
}

.podium-platform {
    border-radius: 12px 12px 0 0;
    padding: 12px 8px 8px;
}

.podium-1 .podium-platform { background: linear-gradient(180deg, rgba(255,214,0,0.2), rgba(255,152,0,0.1)); border: 1px solid rgba(255,214,0,0.4); height: 100px; }
.podium-2 .podium-platform { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); height: 75px; }
.podium-3 .podium-platform { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); height: 60px; }

.podium-name { font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.podium-pts  { font-size: 0.8rem; color: var(--gold); font-weight: 600; }
.podium-rank { font-size: 1.8rem; margin-bottom: 6px; }

/* ── Gorevler Full Page ───────────────────── */
.task-card {
    background: var(--panel-card);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
}

.task-card.completed { border-color: rgba(76,175,80,0.5); background: rgba(76,175,80,0.05); }
.task-card.in-progress { border-color: rgba(33,150,243,0.4); }

.task-card-icon {
    font-size: 2.2rem;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-card-info { flex: 1; }
.task-card-name { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.task-card-desc { font-size: 0.82rem; color: var(--panel-muted); margin-bottom: 10px; }

.task-card-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-card-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.task-card-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s ease;
}

.task-card-fill.done    { background: #4caf50; }
.task-card-fill.active  { background: linear-gradient(90deg, #2196f3, #21cbf3); }
.task-card-fill.pending { background: rgba(255,255,255,0.2); }

.task-card-cnt { font-size: 0.8rem; color: var(--panel-muted); white-space: nowrap; }

.task-card-reward {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 70px;
}

.task-pts-badge {
    background: rgba(255,214,0,0.15);
    border: 1px solid rgba(255,214,0,0.3);
    border-radius: 20px;
    padding: 6px 12px;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.9rem;
}

.task-period-badge {
    font-size: 0.7rem;
    color: var(--panel-muted);
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 3px 8px;
}

/* ── Points Nav Indicator (header) ───────── */
.pts-nav-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,214,0,0.1);
    border: 1px solid rgba(255,214,0,0.3);
    border-radius: 50px;
    padding: 5px 14px;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.pts-nav-indicator:hover {
    background: rgba(255,214,0,0.2);
    color: var(--gold);
    text-decoration: none;
}

.pts-nav-indicator .lvl-icon { font-size: 1rem; }

/* ── Toast Notification ───────────────────── */
.pts-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--panel-card);
    border: 1px solid rgba(255,214,0,0.4);
    border-radius: 14px;
    padding: 16px 22px;
    color: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,214,0,0.2);
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 320px;
}

.pts-toast .toast-icon { font-size: 1.6rem; }
.pts-toast .toast-title { font-size: 0.9rem; font-weight: 700; color: var(--gold); }
.pts-toast .toast-body  { font-size: 0.82rem; color: var(--panel-muted); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(40px) scale(0.8); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .panel-hero { padding: 30px 0 60px; }
    .panel-username { font-size: 1.4rem; }
    .store-grid { grid-template-columns: repeat(2, 1fr); }
    .badges-grid { grid-template-columns: repeat(4, 1fr); }
    .leaderboard-podium { display: none; }
    .task-card { flex-wrap: wrap; }
    .task-card-reward { flex-direction: row; }
}

@media (max-width: 480px) {
    .store-grid { grid-template-columns: 1fr; }
    .badges-grid { grid-template-columns: repeat(3, 1fr); }
    .quick-actions { gap: 6px; }
    .qa-btn { padding: 10px 12px; font-size: 0.82rem; }
}
