:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-glow: 0 0 20px rgba(56, 189, 248, 0.5);
    --player-bg: rgba(15, 23, 42, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    padding-bottom: 110px;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 20%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.centered-header {
    margin-bottom: 3.5rem;
    padding: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.brand-link {
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.2s;
}

.brand-link:hover {
    opacity: 0.85;
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-bottom: 0.4rem;
}

.header-logo {
    height: 52px;
    width: auto;
    margin-top: -14px;
    filter: brightness(0) saturate(100%) invert(67%) sepia(87%) saturate(2364%) hue-rotate(167deg) brightness(101%) contrast(101%);
}

.brand-name {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: -1px;
    line-height: 1;
}

.tagline {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    max-width: 500px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.country-btn {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.country-btn.active {
    background: var(--accent-color);
    color: white;
    box-shadow: var(--accent-glow);
}

.search-container {
    max-width: 500px;
    margin: 0 auto 2rem;
}

#search-input {
    width: 100%;
    padding: 0.75rem 1.2rem;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: var(--text-primary);
    outline: none;
}

.favorites-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 1rem;
    border: 1px dashed rgba(255, 215, 0, 0.2);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: #ffd700;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.blink {
    animation: blink-animation 1.5s infinite;
}

@keyframes blink-animation {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.station-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.station-card:hover {
    border-color: var(--accent-color);
}

.station-card.playing {
    border-color: var(--accent-color);
    background: rgba(56, 189, 248, 0.15);
}

.station-icon {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
}

.station-info h3 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.station-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.fav-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    padding: 5px;
}

.fav-btn:hover {
    color: #ffd700;
    transform: scale(1.2);
}

.fav-btn.active {
    color: #ffd700;
}

.sidebar {
    position: sticky;
    top: 2rem;
}

.glass-panel {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.visitors-tracker h3 {
    font-size: 1.1rem;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { opacity: 0.7; }
    50% { opacity: 1; text-shadow: 0 0 10px red; }
    100% { opacity: 0.7; }
}

.total-visitors {
    text-align: center;
    margin-bottom: 1.5rem;
}

#total-count {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
}

.total-visitors small {
    color: #4ade80;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.country-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem;
    border-radius: 0.4rem;
}

.country-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.flag-icon {
    width: 22px;
    height: 16px;
    border-radius: 2px;
}

.visitor-count {
    font-weight: 600;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
}

.footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--player-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.player-bar.active {
    transform: translateY(0);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 300px;
}

.player-info img {
    width: 45px;
    height: 45px;
    border-radius: 6px;
}

.text-truncate {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: flex;
    flex-direction: column;
}

.station-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.song-title {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 500;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ctrl-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.play-pause-btn {
    background: white;
    color: black;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    justify-content: center;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 200px;
    justify-content: flex-end;
}

input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        order: 2;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .player-bar {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }
    .player-info,
    .player-controls,
    .volume-control {
        width: 100%;
        justify-content: center;
    }
}

/* Fix za prikaz teksta - osigurava UTF-8 */
.visitors-tracker h3::before {
    content: '';
}

.visitors-tracker h3 .material-icons-round {
    font-family: 'Material Icons Round';
}
