/* ====== GIFT SYSTEM STYLES ====== */

.gift-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75vh;
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
}

.gift-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gift-header {
    padding: 8px 20px 16px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border-light);
}

.gift-drag-handle {
    width: 40px;
    height: 4px;
    background: var(--border-medium);
    border-radius: var(--radius-full);
    margin: 0 auto 12px;
}

.gift-header h3 {
    font-size: 15px;
}

.gift-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #FFF7E6, #FFE4B5);
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    font-weight: 700;
}

.gift-balance strong {
    color: var(--coin-gold);
    display: flex;
    align-items: center;
    gap: 4px;
}

.add-coins-btn {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 900;
    font-size: 18px;
}

.gift-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 20px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-light);
}

.gift-tab {
    padding: 6px 14px;
    background: var(--bg-primary);
    border: none;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.gift-tab.active {
    background: var(--primary);
    color: white;
}

.gifts-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.gift-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: var(--bg-primary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.gift-item:hover, .gift-item.selected {
    border-color: var(--primary);
    background: var(--pastel-pink-light);
    transform: translateY(-2px);
}

.gift-item.limited-gift {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 107, 157, 0.1));
    border-color: rgba(255, 215, 0, 0.5);
}

.gift-emoji {
    font-size: 32px;
    margin-bottom: 4px;
}

.gift-name {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2px;
}

.gift-price {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 800;
    color: var(--coin-gold);
}

.limited-tag, .interactive-tag {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary);
    color: white;
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    font-size: 7px;
    font-weight: 800;
}

.interactive-tag {
    background: var(--secondary);
}

.gift-combo-selector {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    align-items: center;
}

.combo-btn {
    padding: 10px 16px;
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-fast);
}

.combo-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.send-gift-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

/* Premium Gift Animations */
.medium-gift-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.medium-gift-emoji {
    font-size: 120px;
    animation: mediumGiftPulse 1s ease infinite;
}

@keyframes mediumGiftPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.premium-gift-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
    pointer-events: none;
    transition: opacity 0.5s;
}

.lion-animation, .dragon-animation, .castle-animation, .universe-animation {
    text-align: center;
}

.lion-emoji, .dragon-emoji, .castle-emoji, .universe-emoji {
    font-size: 200px;
    animation: premiumRoar 2s ease infinite;
    filter: drop-shadow(0 0 30px gold);
}

@keyframes premiumRoar {
    0%, 100% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.2) rotate(-5deg); }
    75% { transform: scale(1.2) rotate(5deg); }
}

.lion-roar-text, .dragon-fire, .castle-fireworks {
    font-size: 40px;
    color: white;
    text-shadow: 0 0 20px gold;
    font-weight: 900;
    margin-top: 20px;
    animation: textPulse 0.5s ease infinite;
}

@keyframes textPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.premium-gift-display {
    text-align: center;
    color: white;
}

.premium-emoji {
    font-size: 180px;
    animation: premiumRoar 2s ease infinite;
    filter: drop-shadow(0 0 40px gold);
}

.premium-text {
    font-size: 36px;
    font-weight: 900;
    text-shadow: 0 0 20px gold;
    margin-top: 20px;
}

/* Legendary Gift */
.legendary-gift-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.4), rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.5s;
}

.legendary-container {
    text-align: center;
    color: white;
    animation: legendaryBounce 1s ease infinite;
}

@keyframes legendaryBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.legendary-text-top {
    font-size: 24px;
    letter-spacing: 4px;
    font-weight: 900;
    background: var(--vip-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    animation: shimmer 2s infinite;
}

.legendary-emoji {
    font-size: 250px;
    filter: drop-shadow(0 0 50px gold);
    animation: legendarySpin 3s ease infinite;
}

@keyframes legendarySpin {
    0% { transform: rotate(0) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.legendary-username {
    font-size: 32px;
    font-weight: 900;
    text-shadow: 0 0 20px gold;
    margin: 20px 0;
}

.legendary-gift-name {
    font-size: 24px;
    color: gold;
    font-weight: 700;
}

.legendary-coins {
    font-size: 40px;
    font-weight: 900;
    color: gold;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Combo Display */
.combo-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 450;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 40px;
    background: linear-gradient(135deg, #FFD700, #FF6B9D);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 900;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
    transition: opacity 0.5s;
    pointer-events: none;
}

.combo-x { font-size: 30px; }
.combo-number { font-size: 50px; }
.combo-label { font-size: 18px; letter-spacing: 3px; }

/* Streak Bonus */
.streak-bonus {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 450;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #EF4444, #F97316);
    color: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    transition: opacity 0.5s;
    pointer-events: none;
}

.streak-flame {
    font-size: 32px;
    animation: flameFlicker 0.5s ease infinite alternate;
}

@keyframes flameFlicker {
    from { transform: scale(1) rotate(-5deg); }
    to { transform: scale(1.1) rotate(5deg); }
}

.streak-info {
    font-weight: 900;
    font-size: 16px;
}

.streak-bonus-text {
    font-size: 12px;
    opacity: 0.9;
}

/* Weather Effects */
.gift-weather {
    position: fixed;
    inset: 0;
    z-index: 350;
    pointer-events: none;
    overflow: hidden;
}

.weather-sparkle {
    position: absolute;
    top: -30px;
    font-size: 24px;
    animation: fallDown 3s linear forwards;
}

@keyframes fallDown {
    to { transform: translateY(105vh); }
}

.weather-rain-drop {
    position: absolute;
    top: -50px;
    animation: fallDown 2s linear forwards;
}

.weather-fire {
    position: absolute;
    bottom: -50px;
    animation: rise 2s ease-out forwards;
}

@keyframes rise {
    to { transform: translateY(-110vh); opacity: 0; }
}

.thunder-storm {
    background: rgba(50, 20, 80, 0.3);
    animation: thunderFlicker 0.3s infinite;
}

@keyframes thunderFlicker {
    0%, 100% { background: rgba(50, 20, 80, 0.3); }
    50% { background: rgba(255, 255, 255, 0.1); }
}

.fire-storm {
    background: rgba(255, 100, 0, 0.2);
}

/* Battle System */
.battle-ui {
    position: absolute;
    top: 60px;
    left: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-lg);
    padding: 12px;
    z-index: 20;
    backdrop-filter: blur(10px);
}

.battle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    margin-bottom: 8px;
}

.battle-title {
    font-weight: 900;
    font-size: 14px;
}

.battle-timer {
    background: #EF4444;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 13px;
}

.battle-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    margin-bottom: 8px;
}

.team {
    text-align: center;
    padding: 8px 16px;
    border-radius: var(--radius-md);
}

.team-red { background: rgba(239, 68, 68, 0.5); }
.team-blue { background: rgba(59, 130, 246, 0.5); }

.team-name {
    font-size: 12px;
    font-weight: 700;
}

.team-coins {
    font-size: 20px;
    font-weight: 900;
    margin-top: 2px;
}

.battle-vs {
    font-size: 18px;
    font-weight: 900;
    color: white;
}

.battle-progress-bar {
    display: flex;
    height: 8px;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.battle-progress-red {
    background: #EF4444;
    transition: width 0.5s ease;
}

.battle-progress-blue {
    background: #3B82F6;
    transition: width 0.5s ease;
}

/* Battle Winner */
.battle-winner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.winner-content {
    background: white;
    padding: 40px;
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 400px;
}

.winner-crown {
    font-size: 80px;
    margin-bottom: 16px;
    animation: mascotBounce 1s infinite;
}

.winner-team {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 12px;
}

.winner-team.team-red { color: #EF4444; }
.winner-team.team-blue { color: #3B82F6; }

.winner-coins {
    font-size: 24px;
    color: var(--coin-gold);
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}