@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Permanent+Marker&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Naruto Village warm autumn theme */
    --primary: #d4894a;      /* Warm orange/copper */
    --secondary: #8b5a3c;    /* Rich brown */
    --accent: #c97a4a;       /* Sunset orange */

    /* Backgrounds */
    --dark: #2d3e50;         /* Dark slate blue */
    --darker: #1a2332;       /* Deep slate */
    --card-bg: rgba(45, 62, 80, 0.85);      /* Semi-transparent dark slate */
    --card-hover: rgba(58, 78, 98, 0.9);

    /* UI lines */
    --border: #8b5a3c;

    /* Text */
    --light: #f5e6d3;        /* Warm cream */
    --muted: #b8a890;

    /* Status */
    --success: #7cb342;
    --danger: #d84315;
    --warning: #ffa726;
    --info: #d4894a;
}

body {
    font-family: 'Bangers', 'Permanent Marker', cursive, sans-serif;
    background: url('game_background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--light);
    min-height: 100vh;
    letter-spacing: 0.5px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('game_background.jpg') no-repeat center center fixed;
    background-size: cover;
    filter: brightness(0.4);
    z-index: -1;
}

.hidden {
    display: none !important;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: url('UI/loading_screen_background.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.loading-container {
    text-align: center;
    width: 90%;
    max-width: 700px;
}

.loading-bar-container {
    width: 100%;
    position: relative;
}

.loading-bar {
    width: 100%;
    height: 40px;
    background: linear-gradient(180deg, #2d1810 0%, #1a0f08 100%);
    border: 3px solid #ff6b35;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(255, 107, 53, 0.4),
        inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.loading-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    border-radius: 25px 25px 0 0;
}

.loading-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        #ff6b35 0%, 
        #ffa726 25%,
        #ffeb3b 50%,
        #ffa726 75%,
        #ff6b35 100%);
    background-size: 200% 100%;
    border-radius: 22px;
    transition: width 0.3s ease;
    box-shadow: 
        0 0 20px rgba(255, 107, 53, 0.8),
        inset 0 2px 10px rgba(255, 255, 255, 0.4);
    animation: narutoShimmer 2s linear infinite;
    position: relative;
}

.loading-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
    border-radius: 22px 22px 0 0;
}

@keyframes narutoShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.loading-percentage {
    font-family: 'Bangers', cursive;
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 1rem;
    letter-spacing: 1px;
}

.auth-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
}

.auth-container {
    text-align: center;
}

.game-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
}

.auth-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 350px;
    border: 1px solid var(--border);
}

.auth-box h2 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.input-field {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    background: var(--darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--light);
    font-size: 1rem;
    transition: all 0.3s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.btn {
    padding: 10px 22px;
    border: 2px solid;
    border-radius: 999px;
    font-family: 'Bangers', cursive;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(
        to bottom,
        #ffb74d 0%,
        #ff9800 60%,
        #f57c00 100%
    );
    border-color: #e65100;
    color: #1c1206;
    width: 100%;
    box-shadow:
        0 2px 0 #e65100,
        0 3px 6px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 3px 0 #e65100,
        0 4px 8px rgba(0,0,0,0.3);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 #e65100,
        0 2px 4px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: var(--info);
    color: white;
}

.btn-secondary:hover {
    background: #1976d2;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #45a049;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #da190b;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-toggle {
    margin-top: 1rem;
    color: #999;
}

.auth-toggle a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

/* New Navbar Design */
.navbar-new {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(30, 25, 35, 0.98) 0%, rgba(20, 18, 25, 0.95) 100%);
    padding: 0.5rem 1.5rem;
    z-index: 1000;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--primary), transparent) 1;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1600px;
    margin: 0 auto;
}

.nav-brand-new {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(212, 137, 74, 0.15) 0%, rgba(139, 90, 60, 0.1) 100%);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.nav-logo-new {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(212, 137, 74, 0.6));
}

.nav-title-new {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--light);
    text-shadow: 0 0 10px rgba(212, 137, 74, 0.4);
}

.nav-stats-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-pill-new {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem 0.3rem 0.3rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 25px;
    border: 2px solid;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-pill-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.stat-pill-new:hover .stat-tooltip-new {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.health-pill { border-color: #ff4757; }
.chakra-pill { border-color: #00d2ff; }
.stamina-pill { border-color: #ffa502; }
.ryo-pill { border-color: #ffd700; }

.stat-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
}

.health-circle { 
    background: radial-gradient(circle, rgba(255, 71, 87, 0.3) 0%, rgba(255, 71, 87, 0.1) 100%);
    border-color: #ff4757;
}
.chakra-circle { 
    background: radial-gradient(circle, rgba(0, 210, 255, 0.3) 0%, rgba(0, 210, 255, 0.1) 100%);
    border-color: #00d2ff;
}
.stamina-circle { 
    background: radial-gradient(circle, rgba(255, 165, 2, 0.3) 0%, rgba(255, 165, 2, 0.1) 100%);
    border-color: #ffa502;
}
.ryo-circle { 
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0.1) 100%);
    border-color: #ffd700;
}

.stat-icon-new {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.stat-value-new {
    font-size: 1rem;
    font-weight: 700;
    color: var(--light);
    min-width: 35px;
}

.stat-tooltip-new {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(212, 137, 74, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 9999;
    min-width: 130px;
    text-align: center;
}

.stat-tooltip-new::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #1a1a2e;
}

.nav-user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info-box {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: right;
}

.user-name-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-end;
}

.star-icon {
    color: #ffd700;
    font-size: 1rem;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light);
}

.user-level-text {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
}

.user-exp-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    justify-content: flex-end;
    font-size: 0.8rem;
    color: var(--muted);
}

.exp-icon {
    font-size: 0.75rem;
}

.exp-label-new {
    color: var(--muted);
}

.btn-logout-new {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #d84315 0%, #bf360c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Bangers', cursive;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-logout-new:hover {
    background: linear-gradient(135deg, #e64a19 0%, #d84315 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(216, 67, 21, 0.4);
}

/* Keep old navbar styles for compatibility */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    font-size: 2rem;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-player-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.player-stats-mini {
    display: flex;
    gap: 0.8rem;
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.stat-pill {
    background: rgba(15, 15, 30, 0.6);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1000;
}

.stat-pill:hover {
    background: rgba(20, 20, 40, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10001;
}

.stat-pill:hover .stat-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.stat-ring-container {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.ring-progress {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease, filter 0.3s ease;
    stroke-dasharray: 100.53;
    stroke-dashoffset: 0;
}

.ring-health {
    stroke: #ff4757;
    filter: drop-shadow(0 0 4px rgba(255, 71, 87, 0.6));
}

.ring-health.low-health {
    animation: pulse-red 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 71, 87, 1));
}

.ring-chakra {
    stroke: #00d2ff;
    filter: drop-shadow(0 0 4px rgba(0, 210, 255, 0.6));
}

.ring-stamina {
    stroke: #ffd93d;
    filter: drop-shadow(0 0 4px rgba(255, 217, 61, 0.6));
}

.ring-stamina.full-stamina {
    animation: pulse-yellow 2s ease-in-out infinite;
}

@keyframes pulse-red {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 71, 87, 0.6)); }
    50% { filter: drop-shadow(0 0 12px rgba(255, 71, 87, 1)); }
}

@keyframes pulse-yellow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 217, 61, 0.6)); }
    50% { filter: drop-shadow(0 0 8px rgba(255, 217, 61, 0.9)); }
}

@keyframes coin-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.stat-pill:hover .stat-icon-img {
    transform: scale(1.1);
}

.stat-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 107, 53, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 9999;
    min-width: 120px;
    text-align: center;
}

.stat-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #1a1a2e;
}

.tooltip-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.tooltip-regen {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.2rem;
}

.player-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.player-plate {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 280px;
}

.player-plate-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--warning);
}

.exp-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.exp-label {
    font-size: 0.75rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.exp-numbers {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}


.level-badge .level-icon {
    font-size: 0.9rem;
    color: var(--secondary);
}

.level-badge .level {
    font-size: 0.9rem;
    color: white;
    font-weight: 700;
}

.exp-bar-modern {
    position: relative;
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.exp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.exp-bar-fill.exp-gain {
    box-shadow: 0 0 12px rgba(255, 138, 43, 0.6);
    animation: exp-highlight 0.4s ease-out;
}

.exp-bar-fill.level-up {
    animation: exp-burst 0.6s ease-out;
}

@keyframes exp-highlight {
    0% { box-shadow: 0 0 12px rgba(255, 138, 43, 0.6); }
    50% { box-shadow: 0 0 20px rgba(255, 138, 43, 0.9); }
    100% { box-shadow: 0 0 12px rgba(255, 138, 43, 0.6); }
}

@keyframes exp-burst {
    0% { box-shadow: 0 0 12px rgba(255, 138, 43, 0.6); }
    50% { box-shadow: 0 0 30px rgba(255, 183, 3, 1), 0 0 50px rgba(255, 183, 3, 0.8); }
    100% { box-shadow: 0 0 12px rgba(255, 138, 43, 0.6); }
}

.btn-game {
    background: linear-gradient(
        to bottom,
        #ffb703 0%,
        #ff8a2b 60%,
        #e06b00 100%
    );
    border: 2px solid #3a1f00;
    border-radius: 999px;
    padding: 10px 22px;
    font-family: 'Bangers', cursive;
    font-weight: 800;
    font-size: 0.95rem;
    color: #1c1206;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 2px 0 #3a1f00,
        0 3px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-game:hover {
    transform: translateY(-1px);
    box-shadow:
        0 3px 0 #3a1f00,
        0 4px 8px rgba(0,0,0,0.3);
}

.btn-game:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 #3a1f00,
        0 2px 4px rgba(0,0,0,0.3);
}

.btn-mission {
    background: linear-gradient(
        to bottom,
        #8fff6a 0%,
        #4caf50 60%,
        #2e7d32 100%
    );
    border: 2px solid #1b4d22;
    border-radius: 999px;
    padding: 10px 22px;
    font-family: 'Bangers', cursive;
    font-weight: 800;
    font-size: 0.95rem;
    color: #0d2611;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 2px 0 #1b4d22,
        0 3px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-mission:hover {
    transform: translateY(-1px);
    box-shadow:
        0 3px 0 #1b4d22,
        0 4px 8px rgba(0,0,0,0.3);
}

.btn-mission:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 #1b4d22,
        0 2px 4px rgba(0,0,0,0.3);
}

.btn-jutsu {
    background: linear-gradient(
        to bottom,
        #8fff6a 0%,
        #4caf50 60%,
        #2e7d32 100%
    );
    border: 2px solid #1b4d22;
    border-radius: 999px;
    padding: 10px 22px;
    font-family: 'Bangers', cursive;
    font-weight: 800;
    font-size: 0.95rem;
    color: #0d2611;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 2px 0 #1b4d22,
        0 3px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-jutsu:hover {
    transform: translateY(-1px);
    box-shadow:
        0 3px 0 #1b4d22,
        0 4px 8px rgba(0,0,0,0.3);
}

.btn-jutsu:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 #1b4d22,
        0 2px 4px rgba(0,0,0,0.3);
}

.btn-danger {
    background: linear-gradient(
        to bottom,
        #ff6b6b 0%,
        #e84855 60%,
        #c62828 100%
    );
    border: 2px solid #8b0000;
    border-radius: 999px;
    padding: 10px 22px;
    font-family: 'Bangers', cursive;
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 2px 0 #8b0000,
        0 3px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow:
        0 3px 0 #8b0000,
        0 4px 8px rgba(0,0,0,0.3);
}

.btn-danger:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 #8b0000,
        0 2px 4px rgba(0,0,0,0.3);
}

.btn-game:disabled,
.btn-mission:disabled,
.btn-jutsu:disabled,
.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: auto;
}

.btn-game:disabled:hover,
.btn-mission:disabled:hover,
.btn-jutsu:disabled:hover,
.btn-danger:disabled:hover {
    transform: none;
}

/* Tooltip styling for disabled buttons */
button[disabled][title] {
    position: relative;
    cursor: not-allowed !important;
}

button[disabled][title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: normal;
    max-width: 250px;
    font-size: 0.85rem;
    font-family: Arial, sans-serif;
    letter-spacing: 0;
    z-index: 10000;
    border: 1px solid var(--danger);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    text-align: center;
}

button[disabled][title]:hover::before {
    content: '';
    position: fixed;
    bottom: auto;
    top: auto;
    left: 50%;
    transform: translate(-50%, -60%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    pointer-events: none;
}

.btn-logout {
    background: var(--danger);
    color: white;
    padding: 0.5rem 1.5rem;
}

.btn-logout:hover {
    background: #da190b;
}

.game-container {
    display: flex;
    margin-top: 80px;
    height: calc(100vh - 80px);
}

.sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    bottom: 0;
    width: 250px;
    background: var(--card-bg);
    border-right: 2px solid var(--border);
    padding: 1rem 0;
    overflow-y: auto;
    z-index: 900;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    color: var(--light);
}

.nav-item:hover {
    background: rgba(212, 137, 74, 0.15);
    border-left-color: var(--primary);
}

.nav-item.active {
    background: rgba(212, 137, 74, 0.25);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.nav-icon {
    font-size: 1.5rem;
}

.nav-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.content {
    flex: 1;
    margin-left: 250px;
    margin-top: 80px;
    padding: 2rem;
    overflow-y: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.rank-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.rank-tab {
    padding: 0.8rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--light);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.rank-tab:hover {
    background: var(--card-hover);
    border-color: var(--primary);
}

.rank-tab.active {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    color: white;
}

.card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.activity-feed {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 0.8rem;
    background: var(--darker);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary);
}

.activity-empty {
    text-align: center;
    color: #999;
    padding: 2rem;
}

.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    background: var(--darker);
    border-radius: 8px;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: var(--darker);
    border-radius: 8px;
}

.achievement-icon {
    font-size: 1.5rem;
}

.missions-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mission-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: row;
    min-height: 160px;
    max-width: 900px;
}

.mission-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
}

.mission-card:hover .mission-image img {
    transform: scale(1.05);
}

/* Rank-based border colors */
.mission-card[data-rank="E-Rank"] {
    border-color: #6b8e23;
}
.mission-card[data-rank="E-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(107, 142, 35, 0.5);
    border-color: #8fbc3f;
}

.mission-card[data-rank="D-Rank"] {
    border-color: #20b2aa;
}
.mission-card[data-rank="D-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(32, 178, 170, 0.5);
    border-color: #3fd4cc;
}

.mission-card[data-rank="C-Rank"] {
    border-color: #ff9800;
}
.mission-card[data-rank="C-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.5);
    border-color: #ffb74d;
}

.mission-card[data-rank="B-Rank"] {
    border-color: #9c27b0;
}
.mission-card[data-rank="B-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.5);
    border-color: #ba68c8;
}

.mission-card[data-rank="A-Rank"] {
    border-color: #dc143c;
}
.mission-card[data-rank="A-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.5);
    border-color: #ff4569;
}

.mission-card[data-rank="S-Rank"] {
    border-color: #ffd700;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
}
.mission-card[data-rank="S-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.3);
    border-color: #ffed4e;
}

.mission-image {
    width: 200px;
    min-width: 200px;
    height: auto;
    background: linear-gradient(135deg, var(--darker), var(--dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-right: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.mission-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.rank-badge.e-rank {
    background: linear-gradient(135deg, #6b8e23, #8fbc3f);
    color: white;
}

.rank-badge.d-rank {
    background: linear-gradient(135deg, #20b2aa, #3fd4cc);
    color: white;
}

.rank-badge.c-rank {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    color: white;
}

.rank-badge.b-rank {
    background: linear-gradient(135deg, #9c27b0, #ba68c8);
    color: white;
}

.rank-badge.a-rank {
    background: linear-gradient(135deg, #dc143c, #ff4569);
    color: white;
}

.rank-badge.s-rank {
    background: linear-gradient(135deg, #000000, #1a1a1a);
    border: 2px solid #ffd700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.mission-content {
    padding: 1rem;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto 1fr;
    gap: 0.5rem;
}

.mission-content .mission-title {
    grid-column: 1 / -1;
}

.mission-content .mission-type-badges {
    grid-column: 1 / -1;
}

.mission-content .mission-description {
    grid-column: 1 / -1;
}

.mission-content .mission-info {
    grid-column: 1;
    grid-row: 4;
    align-self: end;
}

.mission-content > button,
.mission-content > div:last-child {
    grid-column: 2;
    grid-row: 4;
    align-self: end;
    margin-left: 1rem;
    min-width: 140px;
}

.mission-title {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
    font-weight: 700;
    transition: text-shadow 0.3s ease;
}

.mission-card:hover .mission-title {
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.mission-type-badges {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
}

.mission-description {
    color: #ccc;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mission-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0;
    padding: 0.6rem;
    background: rgba(15, 15, 30, 0.4);
    border-radius: 6px;
}

.mission-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #aaa;
}

.mission-stat-icon {
    font-size: 1rem;
}

.mission-stat .stat-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.button-image {
    width: 140px;
    height: auto;
    transition: all 0.3s ease;
    object-fit: contain;
}

.button-image:not(.disabled):hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.button-image.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mission-stat-value {
    font-weight: 700;
    color: var(--light);
}

.mission-timer {
    background: var(--warning);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1rem;
}

.jutsu-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.jutsu-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: row;
    min-height: 150px;
    max-width: 900px;
}

.jutsu-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.5);
}

.jutsu-card:hover .jutsu-image img {
    transform: scale(1.05);
}

/* Rank-based border colors for jutsu */
.jutsu-card[data-rank="E-Rank"] {
    border-color: #6b8e23;
}
.jutsu-card[data-rank="E-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(107, 142, 35, 0.5);
    border-color: #8fbc3f;
}

.jutsu-card[data-rank="D-Rank"] {
    border-color: #20b2aa;
}
.jutsu-card[data-rank="D-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(32, 178, 170, 0.5);
    border-color: #3fd4cc;
}

.jutsu-card[data-rank="C-Rank"] {
    border-color: #ff9800;
}
.jutsu-card[data-rank="C-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.5);
    border-color: #ffb74d;
}

.jutsu-card[data-rank="B-Rank"] {
    border-color: #9c27b0;
}
.jutsu-card[data-rank="B-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.5);
    border-color: #ba68c8;
}

.jutsu-card[data-rank="A-Rank"] {
    border-color: #dc143c;
}
.jutsu-card[data-rank="A-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.5);
    border-color: #ff4569;
}

.jutsu-card[data-rank="S-Rank"] {
    border-color: #ffd700;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
}
.jutsu-card[data-rank="S-Rank"]:hover {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.3);
    border-color: #ffed4e;
}

.jutsu-image {
    width: 180px;
    min-width: 180px;
    height: auto;
    background: linear-gradient(135deg, var(--darker), var(--dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-right: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.jutsu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.jutsu-content {
    padding: 1rem;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto 1fr;
    gap: 0.5rem;
}

.jutsu-content .jutsu-title {
    grid-column: 1 / -1;
}

.jutsu-content .mission-type-badges {
    grid-column: 1 / -1;
}

.jutsu-content .jutsu-description {
    grid-column: 1 / -1;
}

.jutsu-content .mission-info {
    grid-column: 1;
    align-self: end;
}

.jutsu-content .jutsu-mastery {
    grid-column: 1 / -1;
}

.jutsu-content > button,
.jutsu-content > div:last-child {
    grid-column: 2;
    align-self: end;
    margin-left: 1rem;
    min-width: 140px;
}

.jutsu-title {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
    font-weight: 700;
    transition: text-shadow 0.3s ease;
}

.jutsu-card:hover .jutsu-title {
    text-shadow: 0 0 10px rgba(33, 150, 243, 0.5);
}

.jutsu-description {
    color: #ccc;
    margin-bottom: 0.8rem;
    font-size: 0.82rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jutsu-learned {
    background: var(--success);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.mission-locked {
    background: var(--darker);
    color: #999;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--border);
}

.jutsu-mastery {
    background: var(--darker);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.mastery-level {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.mastery-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    font-size: 0.9rem;
}

.mastery-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.fight-info {
    margin-bottom: 2rem;
}

.fight-info p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.opponents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.opponent-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.opponent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.opponent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.opponent-name {
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 700;
}

.opponent-level {
    background: var(--secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.opponent-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.items-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 600px;
    overflow-y: auto;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--darker);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.item-name {
    font-weight: 600;
    color: var(--primary);
}

.item-description {
    font-size: 0.85rem;
    color: #999;
}

.item-quantity {
    background: var(--info);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.duties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.duty-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.duty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.duty-title {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.duty-description {
    color: #ccc;
    margin-bottom: 1rem;
}

.duty-timer {
    background: var(--warning);
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1rem;
}

.kage-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0 0 2rem 0;
}

.shop-packages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.shop-package {
    background: var(--darker);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.package-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.package-cost {
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 600;
}

.stat-display {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: var(--darker);
    border-radius: 8px;
    font-size: 1.1rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.skill-card {
    background: var(--darker);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.skill-name {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.skill-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.skill-upgrade {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.skill-upgrade input {
    width: 60px;
    padding: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--light);
    text-align: center;
}

.profile-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.profile-stats, .profile-record {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.team-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.team-members {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.team-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--darker);
    border-radius: 8px;
}

.info-text {
    color: #999;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid var(--border);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--danger);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #da190b;
    transform: rotate(90deg);
}

.modal-content h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--darker);
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--border);
    }

    .nav-menu {
        display: flex;
        overflow-x: auto;
    }

    .nav-item {
        flex-direction: column;
        padding: 0.8rem;
        min-width: 80px;
        text-align: center;
    }

    .items-layout {
        grid-template-columns: 1fr;
    }

    .player-stats-mini {
        flex-wrap: wrap;
    }

    .nav-player-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Player Profile View */
.player-profile-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    z-index: 1000;
    overflow-y: auto;
    display: none;
}

.player-profile-view.active {
    display: block;
}

.profile-view-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.profile-view-header h1 {
    color: var(--primary);
    font-size: 1.8rem;
    flex: 1;
    text-align: center;
}

.btn-back {
    background: linear-gradient(
        to bottom,
        #6c757d 0%,
        #5a6268 60%,
        #495057 100%
    );
    border: 2px solid #343a40;
    border-radius: 999px;
    padding: 10px 22px;
    font-family: 'Bangers', cursive;
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 2px 0 #343a40,
        0 3px 6px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-back:hover {
    transform: translateY(-1px);
    box-shadow:
        0 3px 0 #343a40,
        0 4px 8px rgba(0,0,0,0.3);
}

.btn-back:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 #343a40,
        0 2px 4px rgba(0,0,0,0.3);
}

.profile-view-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-main-info {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid var(--primary);
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-rank {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.profile-link {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-link code {
    background: var(--darker);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    word-break: break-all;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.profile-stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.profile-stat-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.profile-stat-card .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.profile-stat-card .stat-row:last-child {
    border-bottom: none;
}

.profile-jutsus {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.profile-jutsus h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.jutsu-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.jutsu-badge {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Profile link in opponent cards */
.view-profile-btn {
    background: transparent;
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.view-profile-btn:hover {
    background: var(--secondary);
    color: white;
}

.opponent-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}

/* Mission Requirements */
.mission-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.mission-requirements .requirement {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.4);
}

.mission-requirements .requirement.met {
    color: var(--success);
    border: 1px solid var(--success);
}

.mission-requirements .requirement.unmet {
    color: var(--danger);
    border: 1px solid var(--danger);
}

.mission-stat.item-cost {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid #ffc107;
    color: #ffc107;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* Level Up Popup */
.level-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.level-up-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.level-up-scroll {
    display: flex;
    align-items: stretch;
    max-width: 600px;
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.scroll-decoration {
    width: 30px;
    background: linear-gradient(to bottom, #8B4513, #654321, #8B4513);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(139, 69, 19, 0.5);
}

.scroll-decoration.left {
    border-right: 3px solid #654321;
}

.scroll-decoration.right {
    border-left: 3px solid #654321;
}

.scroll-content {
    background: linear-gradient(135deg, #f5e6c8, #e8d4a8, #f5e6c8);
    padding: 2rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 4px solid #8B4513;
    border-bottom: 4px solid #8B4513;
}

.level-up-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.level-up-image {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.level-up-image img {
    max-width: 150px;
    height: auto;
}

.level-up-icon {
    font-size: 5rem;
    animation: bounce 0.6s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.level-up-title {
    color: #8B4513;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.level-up-message {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.level-up-message strong {
    color: #d4af37;
    font-size: 1.4rem;
}

.level-up-rewards {
    color: #555;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.level-up-rewards strong {
    color: #2e7d32;
}

.level-up-bonus {
    color: #555;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.level-up-bonus strong {
    color: #1565c0;
}

.level-up-hokage {
    color: #555;
    font-size: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    background: rgba(255, 215, 0, 0.2);
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #d4af37;
}

.level-up-hokage strong {
    color: #d4af37;
}

.level-up-close {
    position: relative;
    z-index: 1;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    background: linear-gradient(45deg, #8B4513, #654321);
    border: none;
    color: #f5e6c8;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.level-up-close:hover {
    background: linear-gradient(45deg, #654321, #8B4513);
    transform: scale(1.05);
}

/* Fight Page Info Section */
.fight-your-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.fight-info-section {
    flex: 1;
    min-width: 150px;
}

.fight-info-section h3 {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.fight-stats-display {
    display: flex;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.fight-stats-display span:first-child {
    color: #ff6b6b;
}

.fight-stats-display span:last-child {
    color: #4ecdc4;
}

.team-members-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.team-member-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--secondary);
}

/* Battle Type Labels */
.battle-type {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.battle-type.pve {
    background: rgba(156, 39, 176, 0.2);
    color: #ba68c8;
    border: 1px solid #ba68c8;
}

.battle-type.pvp {
    background: rgba(244, 67, 54, 0.2);
    color: #ef5350;
    border: 1px solid #ef5350;
}

/* Profile Stat Upgrades */
.stat-row-upgrade {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.stat-row-upgrade span:first-child {
    font-weight: 600;
    color: var(--secondary);
}

.stat-row-upgrade span:nth-child(2) {
    color: var(--light);
    font-weight: 600;
}

.upgrade-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-upgrade {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-upgrade:active {
    transform: translateY(0);
}

/* Compact Hokage Stats */
.kage-stats-compact {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.stat-display-compact {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 2rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    align-items: center;
    border: 2px solid var(--primary);
    max-width: 400px;
}

.stat-display-compact span:first-child {
    color: #ffffff;
    font-weight: 600;
}

.stat-display-compact span:last-child {
    color: #ffd700;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Navigation Badge */
.nav-badge {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Avatar Placeholder */
.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 4rem;
    font-weight: 700;
    border-radius: 50%;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile Stats Upgrade Buttons */
.stat-row-upgrade {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--darker);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.stat-row-upgrade span:first-child {
    font-weight: 600;
    color: #ccc;
}

.stat-row-upgrade span:nth-child(2) {
    color: var(--primary);
    font-weight: 700;
    min-width: 80px;
    text-align: center;
}

.upgrade-buttons {
    display: flex;
    gap: 0.25rem;
}

.btn-upgrade {
    background: linear-gradient(135deg, #43a047, #2e7d32);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upgrade:hover {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    transform: scale(1.05);
}

/* Combat Stats Card in Profile View - wider */
.profile-stat-card {
    background: var(--darker);
    padding: 1.25rem;
    border-radius: 12px;
    min-width: 280px;
}

.profile-stat-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.profile-stat-card .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.profile-stat-card .stat-row:last-child {
    border-bottom: none;
}

/* Requirements/Rewards Sections for Missions and Jutsu */
.mission-requirements-section,
.jutsu-requirements {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.75rem 0;
}

.requirement-section,
.reward-section {
    margin-bottom: 0.5rem;
}

.requirement-section:last-child,
.reward-section:last-child {
    margin-bottom: 0;
}

.requirement-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.requirement-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.requirement-items .mission-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

/* Bank Section */
.bank-card {
    border: 2px solid #ffd700;
}

.bank-balances {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.bank-balance-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.bank-balance-item span:first-child {
    font-size: 0.85rem;
    color: #888;
}

.bank-balance-item span:last-child {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
}

.bank-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Notification Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .profile-main-info {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-view-header {
        flex-direction: column;
    }
    
    .profile-view-header h1 {
        order: -1;
    }
}
