/* ═══ Events Screen ═══ */
.events-page {
    padding: 12px;
    max-width: 480px;
    margin: 0 auto;
}
.events-page-header {
    text-align: center;
    padding: 16px 0 8px;
}
.events-page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 4px;
}
.events-page-subtitle {
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    margin: 0;
}

/* ─── Schedule list (rows) ─── */

/* ─── Battle screen ─── */
.event-battle {
    padding: 12px;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.event-battle-header {
    text-align: center;
    padding: 8px 0;
}
.event-battle-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0;
}
.event-battle-round {
    font-size: 13px;
    color: var(--text-secondary, #aaa);
}

/* HP bars */
.event-fighters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.event-fighter {
    background: var(--card-bg, #1a1a2e);
    border-radius: 10px;
    padding: 10px 12px;
}
.event-fighter-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 6px;
}
.event-hp-bar {
    height: 20px;
    border-radius: 6px;
    background: #333;
    overflow: hidden;
    position: relative;
}
.event-hp-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}
.event-hp-fill--me {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}
.event-hp-fill--opp {
    background: linear-gradient(90deg, #f44336, #ef5350);
}
.event-hp-fill--boss {
    background: linear-gradient(90deg, #9c27b0, #ba68c8);
}
.event-hp-text {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Combat power bar */
.event-power-section {
    background: var(--card-bg, #1a1a2e);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}
.event-power-bar {
    height: 24px;
    border-radius: 8px;
    background: #333;
    overflow: hidden;
    margin-bottom: 10px;
}
.event-power-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2196f3, #42a5f5);
    border-radius: 8px;
    transition: width 0.1s linear;
}
.event-power-label {
    font-size: 12px;
    color: var(--text-secondary, #aaa);
    margin-bottom: 8px;
}
.event-attack-btn {
    width: 100%;
    min-height: 48px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: #fff;
    cursor: pointer;
}
.event-attack-btn:disabled {
    background: #555;
    cursor: default;
}

/* Combat log */
.event-log {
    background: var(--card-bg, #1a1a2e);
    border-radius: 10px;
    padding: 10px 12px;
    max-height: 150px;
    overflow-y: auto;
}
.event-log-entry {
    font-size: 12px;
    color: var(--text-secondary, #aaa);
    padding: 2px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.event-log-entry--kill {
    color: #f44336;
    font-weight: 600;
}

/* Boss specific */
.event-boss-info {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid #9c27b0;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}
.event-boss-name {
    font-size: 20px;
    font-weight: 700;
    color: #ba68c8;
    margin-bottom: 8px;
}
.event-boss-players {
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    margin-top: 6px;
}
.event-my-damage {
    font-size: 14px;
    color: var(--accent-orange, #ff9800);
    margin-top: 4px;
}

/* Results */
.event-results {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--accent-gold, #ffd700);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.event-results-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-gold, #ffd700);
    margin-bottom: 12px;
}
.event-results-row {
    font-size: 14px;
    color: var(--text-primary, #fff);
    padding: 4px 0;
}

/* Team info */
.event-team-info {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.event-team-side {
    flex: 1;
    background: var(--card-bg, #1a1a2e);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}
.event-team-label {
    font-size: 13px;
    color: var(--text-secondary, #aaa);
    margin-bottom: 4px;
}
.event-team-alive {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary, #fff);
}

/* Back button */
.event-back-btn {
    min-height: 44px;
    width: 100%;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid var(--border-color, #333);
    border-radius: 10px;
    background: transparent;
    color: var(--text-primary, #fff);
    cursor: pointer;
    margin-top: 8px;
}

/* Event notification popup */
.event-notif-popup {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--accent-orange, #ff9800);
    border-radius: 14px;
    padding: 14px 16px;
    width: calc(100% - 32px);
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.3);
    display: none;
    animation: eventNotifSlideDown 0.3s ease;
}
@keyframes eventNotifSlideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.event-notif-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 10px;
    text-align: center;
}
.event-notif-actions {
    display: flex;
    gap: 8px;
}
.event-notif-btn {
    flex: 1;
    min-height: 40px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
}
.event-notif-btn--join {
    background: var(--accent-green, #4caf50);
}
.event-notif-btn--hide {
    background: #555;
}

/* ─── Events list (schedule rows) ─── */
.events-schedule {
    display: flex;
    flex-direction: column;
    margin-top: 12px;
}
.events-list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border-color, #2a2a3e);
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 4px;
}
.events-list-row:last-child {
    border-bottom: none;
}
.events-list-row:active {
    background: rgba(255,255,255,0.05);
}
.events-list-row--active {
    background: rgba(76, 175, 80, 0.08);
    border-left: 3px solid var(--accent-green, #4caf50);
    padding-left: 9px;
}
.events-list-row--active.events-list-row--active {
    border-bottom-color: transparent;
}
.events-list-row--past {
    opacity: 0.65;
}
.events-list-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.events-list-label {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}
.events-list-time {
    font-size: 12px;
    color: var(--text-secondary, #aaa);
    white-space: nowrap;
    text-align: right;
}
.events-list-row--active .events-list-time {
    color: var(--accent-green, #4caf50);
    font-weight: 600;
}
.events-list-arrow {
    font-size: 18px;
    color: var(--text-secondary, #666);
    flex-shrink: 0;
}

/* ─── Event lobby ─── */
.event-lobby-content {
    padding: 4px 0 12px;
}
.event-lobby-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color, #2a2a3e);
}
.event-lobby-icon {
    font-size: 36px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg, #1a1a2e);
    border-radius: 12px;
    flex-shrink: 0;
}
.event-lobby-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #fff);
}
.event-lobby-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
}
.event-lobby-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color, #2a2a3e);
}
.event-lobby-row:last-child {
    border-bottom: none;
}
.event-lobby-key {
    font-size: 14px;
    color: var(--text-secondary, #aaa);
}
.event-lobby-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}
.event-lobby-status--registration {
    color: var(--accent-green, #4caf50);
}
.event-lobby-status--active {
    color: var(--accent-orange, #ff9800);
}
.event-lobby-status--finished {
    color: #888;
}
.event-lobby-btn {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
    margin-top: 4px;
}
.event-lobby-btn--register {
    background: linear-gradient(135deg, var(--accent-green, #4caf50), #388e3c);
}
.event-lobby-btn--enter {
    background: linear-gradient(135deg, var(--accent-orange, #ff9800), #e65100);
}
.event-lobby-registered {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-green, #4caf50);
    padding: 12px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 10px;
    border: 1px solid var(--accent-green, #4caf50);
}

/* Upcoming button (disabled) */
.event-lobby-btn--upcoming {
    background: #444;
    cursor: default;
    opacity: 0.7;
}

/* Spectator info (not registered, event active/finished) */
.event-lobby-spectator {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid var(--border-color, #2a2a3e);
}
.event-lobby-spectator-icon {
    font-size: 28px;
    margin-bottom: 6px;
}
.event-lobby-spectator-text {
    font-size: 14px;
    color: var(--text-secondary, #aaa);
    line-height: 1.4;
}

/* ─── Event Skills Grid ─── */
.event-skills-grid {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.event-skill-btn {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    border: 2px solid #60a5fa;
    background: var(--card-bg, #1a1a2e);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
}
.event-skill-btn:disabled {
    opacity: 0.4;
    cursor: default;
}
.event-skill-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
}
.event-skill-cd {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: rgba(0, 0, 0, 0.85);
    color: #ff9800;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.2;
}
