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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f1a;
    color: #fff;
    min-height: 100vh;
}

.app {
    max-width: 420px;
    margin: 0 auto;
    padding: 10px;
}

/* Header */
.header {
    text-align: center;
    padding: 15px 0 10px;
}

.header h1 {
    font-size: 22px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 3px;
}

/* Balance */
.balance-card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.balance-item {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

/* Stats */
.stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
    gap: 6px;
}

.stat {
    text-align: center;
    background: #1a1a2e;
    border-radius: 10px;
    padding: 8px 10px;
    flex: 1;
}

.stat-icon {
    font-size: 20px;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 9px;
    opacity: 0.7;
}

/* Buttons */
.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}

.btn {
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: transform 0.1s;
    width: 100%;
}

.btn:active {
    transform: scale(0.95);
}

.btn-small {
    padding: 8px 12px;
    font-size: 11px;
    width: auto;
}

.btn-primary { background: #667eea; }
.btn-danger { background: #e74c3c; }
.btn-attack { background: #e67e22; }
.btn-shop { background: #2ecc71; }

/* Tabs */
.tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
    overflow-x: auto;
}

.tab {
    flex: 1;
    padding: 8px 6px;
    background: #1a1a2e;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    min-width: fit-content;
}

.tab.active {
    background: #667eea;
}

/* Tab Content */
.tab-content {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}

.tab-content h3 {
    margin-bottom: 8px;
    font-size: 15px;
}

.hidden {
    display: none;
}

/* Effects */
.effect-card {
    background: #16213e;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.effect-name {
    font-weight: bold;
    font-size: 13px;
}

.effect-desc {
    font-size: 10px;
    opacity: 0.7;
}

.effect-price {
    color: #667eea;
    font-size: 12px;
    font-weight: bold;
}

.effect-btn {
    padding: 6px 12px;
    background: #667eea;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 11px;
}

.temp-effects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

/* Shop */
.shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.shop-item {
    background: #16213e;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.1s;
}

.shop-item:active {
    transform: scale(0.95);
}

.shop-icon {
    font-size: 28px;
}

.shop-name {
    font-size: 12px;
    font-weight: bold;
    margin: 5px 0;
}

.shop-price {
    font-size: 11px;
    color: #2ecc71;
    font-weight: bold;
}

/* Top */
.top-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #2a2a4a;
    font-size: 12px;
    gap: 8px;
}

.top-player:last-child {
    border-bottom: none;
}

.top-rank {
    font-weight: bold;
    width: 25px;
    font-size: 14px;
}

/* Inputs */
input {
    background: #16213e;
    color: #fff;
    border: 1px solid #2a2a4a;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}

input::placeholder {
    color: #666;
}

/* Floating text */
.floating {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #667eea;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 18px;
    pointer-events: none;
    animation: floatUp 1s ease-out forwards;
    z-index: 1000;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -100px); }
}