/* --- GLOBALNI STILOVI --- */

/* --- GLOBALNI STILOVI --- */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    padding-bottom: 50px;
    margin: 0;
    /* Onemogućava horizontalni skrol */
    overflow-x: hidden; 
    min-height: 100vh;
}

/* Glavni kontejner za sve strane */
.main-container {
    max-width: 550px; 
    margin: 0 auto;
    background: transparent;
    min-height: 100vh;
    padding: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Linkovi bez podvlačenja */
a { text-decoration: none; }

/* --- NAVIGACIJA & HEADER --- */
.top-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 5px;
    flex-shrink: 0;
}

.nav-btn {
    background-color: #222;
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    border: 1px solid #333;
    box-shadow: 0 2px 5px rgba(255,255,255,0.1);
    transition: all 0.2s;
}

.nav-btn:hover { background-color: #333; color: #f89f1f; transform: scale(1.1); }
.nav-btn:active { transform: scale(0.9); }

.logo-area { margin-bottom: 20px; flex-shrink: 0; }
.logo-area img { width: 60%; max-width: 100%; height: auto; filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.15)); }

.page-title {
    font-weight: 900;
    font-size: 1.6rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.sub-title {
    font-size: 1.2rem;
    color: #f89f1f;
    font-weight: bold;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.section-header {
    background: linear-gradient(90deg, transparent, #0f6812, transparent);
    padding: 8px;
    margin: 30px 0 15px 0;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 1.1rem;
    color: #fff;
}

/* --- DUGMIĆI (METALNI & OSTALI) --- */
.btn-metal {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 12px 5px;
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    border-radius: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, #0f6812 0%, #1a8a1e 50%, #0f6812 100%);
    border: 1px solid #0a4d0c;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 4px 6px rgba(0,0,0,0.5);
    transition: transform 0.1s, box-shadow 0.1s;
    position: relative;
    overflow: hidden;
}

.btn-metal:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.7); color: #fff; }
.btn-metal:active { transform: translateY(1px); box-shadow: 0 2px 4px rgba(0,0,0,0.4); }

.btn-results {
    /* Metalni gradijent: Tamno -> Tvoja Boja -> Tamno */
    background: linear-gradient(135deg, #d67f08 0%, #f89f1f 50%, #d67f08 100%);
    
    /* Tamniji okvir da dugme "iskoči" */
    border-color: #a65e00;
    
    /* Dodajemo malo jači padding da liči na ostale */
    padding: 15px;
    
    /* Zbog svetle pozadine, možda ćeš želeti da tekst bude crn, 
       ali ako želiš beli kao na ostalim dugmićima, ostavi color: white 
       uz jaču senku */
    color: #fff; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8); /* Malo jača senka da se beli tekst vidi na narandžastoj */
}

/* Opciono: Efekat kad pređeš mišem (hover) - da posvetli */
.btn-results:hover {
    background: linear-gradient(135deg, #e08b1f 0%, #ffad33 50%, #e08b1f 100%);
}

.btn-back {
    display: block;
    width: 100%;
    padding: 15px;
    margin-top: 30px;
    background: linear-gradient(135deg, #37474f 0%, #546e7a 50%, #37474f 100%);
    border: 1px solid #263238;
    color: white;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
}

/* --- KARTICE (TABELA & PLASMAN) --- */
.ranking-card {
    background-color: #ffffff;
    color: #000000;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(255,255,255,0.1);
    text-align: left;
    border-left: 5px solid #0f6812;
}

.rank-header { display: flex; align-items: center; border-bottom: 1px solid #ddd; padding-bottom: 5px; margin-bottom: 5px; }
.rank-pos { font-size: 1.2rem; font-weight: 900; color: #0f6812; margin-right: 10px; width: 30px; }
.rank-team { font-size: 1.1rem; font-weight: bold; text-transform: uppercase; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rank-stats { display: flex; justify-content: space-between; font-size: 0.9rem; }
.stat-box { display: flex; flex-direction: column; align-items: center; width: 16%; }
.stat-label { font-size: 0.7rem; color: #666; font-weight: bold; margin-bottom: 2px; }
.stat-value { font-weight: bold; font-size: 1rem; }
.stat-box.points .stat-value { color: #f89f1f; font-size: 1.2rem; font-weight: 900; }
.stat-box.points .stat-label { color: #f89f1f; }

/* --- MATCH CARD (UTAKMICE) --- */
.match-card {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #f89f1f;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

/* Zeleni header unutar kartice */
.match-phase-header, .match-category-header {
    position: relative;
    background: linear-gradient(90deg, transparent, #0f6812, transparent);
    color: #fff;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    padding: 5px 0;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin: -15px -15px 10px -15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.match-number {
    position: absolute;    /* Izvlači broj iz toka teksta */
    left: 15px;            /* Fiksira ga 15px od leve ivice (da se poravna sa ivicom kartice) */
    top: 50%;              /* Gura ga na pola visine */
    transform: translateY(-50%); /* Centrira ga savršeno vertikalno */
    
    color: #f89f1f;        /* Tvoja narandžasta boja */
    font-weight: 900;      /* Malo deblji font za broj */
    font-size: 1rem;       /* Veličina broja */
}

.match-info { display: flex; justify-content: space-between; font-size: 0.85rem; color: #aaa; margin-bottom: 10px; border-bottom: 1px solid #333; padding-bottom: 5px; }
.match-date { color: #f89f1f; font-weight: bold; }
.match-teams { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; font-weight: bold; }
.team-name { width: 35%; line-height: 1.2; font-size: 0.95rem; }
.team-home { text-align: center; }
.team-away { text-align: center; }

.match-score {
    background: #333;
    color: #fff;
    padding: 8px 0;
    border-radius: 5px;
    font-weight: 900;
    font-size: 1.2rem;
    margin: 0 5px;
    min-width: 90px;
    text-align: center;
    white-space: nowrap;
    border: 1px solid #444;
}

/* --- FINALE (Playoff style) --- */
.final-match {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border: 2px solid #f89f1f; 
    box-shadow: 0 0 15px rgba(248, 159, 31, 0.3); 
    transform: scale(1.02);
    margin-top: 30px;
    margin-bottom: 30px;
}
.final-header {
    background: linear-gradient(90deg, transparent, #0f6812, transparent);
    text-align: center;
    color: #ffffff;
    font-weight: 900;
    font-size: 1.1rem;
    margin: -15px -15px 15px -15px;
    padding: 10px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.final-match .match-score { background: #f89f1f; color: #000; border: none; font-size: 1.4rem; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }

/* --- TICKER / SCROLLING (Samo za stranu 5) --- */
.ticker-window {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}
.ticker-content { animation: scrollUp 20s linear infinite; }
.ticker-window:hover .ticker-content { animation-play-state: paused; }
.live-indicator { color: #ff0000; font-weight: bold; font-size: 0.9rem; margin-bottom: 15px; animation: pulse 1.5s infinite; flex-shrink: 0; }

/* --- FOOTER --- */
.footer-note { margin-top: 40px; font-size: 0.9rem; color: #aaa; border-top: 1px solid #333; padding-top: 20px; }
.bottom-icons img { margin: 10px; max-height: 50px; }

/* --- ANIMACIJE --- */
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scrollUp { 0% { transform: translateY(0); } 100% { transform: translateY(-50%); } }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.fly-in-left { opacity: 0; animation: slideInLeft 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.fly-in-right { opacity: 0; animation: slideInRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.fly-in-up { opacity: 0; animation: fadeInUp 0.6s ease-out forwards; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }