/* SZÜV ASE PWA - Mobile Styles */
/* Earth-tone design matching desktop theme */

:root {
    --bg: #F5F1E6;
    --card: #EFE8D8;
    --card-inner: #FAF8F2;
    --sidebar: #2F3F4D;
    --text: #4F453C;
    --soft: #6B5F54;
    --border: #DDD6C4;
    --accent: #2F3F4D;
    --green: #2E7D3A;
    --red: #C0392B;
    --accent-warm: #7A6A5A;
    --nav-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ===== APP CONTAINER ===== */
#app {
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
#app::-webkit-scrollbar { display: none; }

/* When nav is hidden (login), full height */
body.no-nav #app {
    height: 100vh;
}

/* ===== BOTTOM NAV ===== */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--soft);
    font-size: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color .2s, background .2s;
}

.nav-item.active {
    color: var(--accent);
    background: rgba(47, 63, 77, .06);
}

.nav-icon {
    font-size: 22px;
    line-height: 1;
}

.nav-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ===== SCREEN HEADER ===== */
.screen-header {
    position: sticky;
    top: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    z-index: 50;
}

.screen-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text);
}

/* ===== CARDS ===== */
.m-card {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin: 8px 12px;
    overflow: hidden;
}

.m-card-header {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--soft);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.m-card-body {
    padding: 12px 14px;
}

/* ===== BUTTONS ===== */
.m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-family: 'Barlow', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

.m-btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.m-btn-primary:active {
    background: #243240;
}

.m-btn-secondary {
    background: var(--card-inner);
    color: var(--text);
}

.m-btn-full {
    width: 100%;
}

/* ===== FORM INPUTS ===== */
.m-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-inner);
    font-family: 'Barlow', sans-serif;
    font-size: .95rem;
    color: var(--text);
    outline: none;
    transition: border-color .2s;
}

.m-input:focus {
    border-color: var(--accent);
}

.m-label {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--soft);
    margin-bottom: 6px;
}

.m-form-group {
    margin-bottom: 16px;
}

/* ===== LOGIN SCREEN ===== */
.login-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 24px;
    background: var(--bg);
}

.login-logo {
    font-size: 48px;
    margin-bottom: 8px;
}

.login-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent);
    margin-bottom: 32px;
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 24px;
}

.login-error {
    background: rgba(196, 122, 122, .15);
    color: var(--red);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .85rem;
    margin-bottom: 16px;
    display: none;
}

/* ===== PWA INSTALL ===== */
.pwa-install-btn {
    margin-top: 20px;
    padding: 12px 24px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .03em;
}
.pwa-install-btn:active { opacity: .8; }

.pwa-install-hint {
    margin-top: 16px;
    padding: 10px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: .8rem;
    color: var(--soft);
    text-align: center;
    max-width: 360px;
}

/* ===== LOADING ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--soft);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .6s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--soft);
}

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

/* ===== MATCH CARD (list item) ===== */
.match-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
}

.match-item:last-child {
    border-bottom: none;
}

.match-item:active {
    background: rgba(0,0,0,.03);
}

.match-teams {
    flex: 1;
    min-width: 0;
}

.match-team-name {
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-meta {
    font-size: .75rem;
    color: var(--soft);
    margin-top: 2px;
}

.match-score {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    min-width: 50px;
    text-align: center;
}

.match-score.win { color: var(--green); }
.match-score.loss { color: var(--red); }
.match-score.draw { color: var(--accent-warm); }

.match-date-badge {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .7rem;
    font-weight: 700;
    color: var(--soft);
    text-align: center;
    min-width: 44px;
    margin-right: 10px;
}

.match-date-day {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

/* ===== PLAYER AVATAR ===== */
.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border);
}

.player-avatar-lg {
    width: 60px;
    height: 60px;
}

/* ===== RANKING LIST ===== */
.rank-item {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(0,0,0,.04);
}

.rank-pos {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--soft);
    min-width: 28px;
    text-align: center;
}

.rank-name {
    flex: 1;
    font-weight: 500;
    font-size: .9rem;
}

.rank-score {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    color: var(--accent-warm);
    font-size: .9rem;
}

/* ===== STAT GRID ===== */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.stat-item {
    text-align: center;
    padding: 10px 8px;
    background: var(--card-inner);
    border-radius: 8px;
}

.stat-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
}

.stat-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--soft);
    margin-top: 2px;
}

/* ===== BADGE ===== */
.m-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.m-badge-home { background: #E0EDE4; color: var(--green); }
.m-badge-away { background: #EDE4D4; color: var(--accent-warm); }

/* ===== NEWS ITEM ===== */
.news-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-title {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 4px;
}

.news-snippet {
    font-size: .8rem;
    color: var(--soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: .7rem;
    color: var(--border);
    margin-top: 4px;
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.text-soft { color: var(--soft); }
.text-sm { font-size: .8rem; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.p-16 { padding: 16px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
