/* Reset i osnovni stilovi */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a1a;
    color: #ffffff;
    overflow-x: hidden;
}

/* Horizontal Header */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #1a1a2e;
    border-bottom: 1px solid #2a2a4a;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px;
    max-width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

.site-logo {
    font-size: 1.5em;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-logo a {
    text-decoration: none;
    color: inherit;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: none;
}

/* Search u headeru */
.header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6666aa;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 45px;
    background: #2a2a4a;
    border: 1px solid #3a3a6a;
    border-radius: 25px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: #3a3a5a;
}

.search-input::placeholder {
    color: #6666aa;
}

/* Layout */
.layout-container {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

/* Collapsible Sidebar */
.sidebar-container {
    position: fixed;
    left: 0;
    top: 60px;
    height: calc(100vh - 60px);
    background: #16162a;
    border-right: 1px solid #2a2a4a;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Skriveni sidebar (samo ikonice) */
.sidebar-container.collapsed {
    width: 60px;
}

.sidebar-container.collapsed .sidebar-label {
    opacity: 0;
    width: 0;
    transform: translateX(-10px);
}

/* Prošireni sidebar na hover */
.sidebar-container:hover,
.sidebar-container:focus-within {
    width: 220px;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
}

.sidebar-container:hover .sidebar-label,
.sidebar-container:focus-within .sidebar-label {
    opacity: 1;
    width: auto;
    transform: translateX(0);
}

.sidebar-inner {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: #8888bb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sidebar-link:hover {
    background: #2a2a4a;
    color: #ffffff;
}

.sidebar-link:hover .sidebar-icon {
    color: #8b5cf6;
}

.sidebar-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.sidebar-label {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.sidebar-divider {
    height: 1px;
    background: #2a2a4a;
    margin: 10px 15px;
}

/* Main Content */
.main-content {
    margin-left: 60px; /* Odgovara collapsed sidebar-u */
    flex: 1;
    padding: 20px 30px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.game-card {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #2a2a4a;
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.game-thumbnail {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #2a2a4a;
    position: relative;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.05);
}

.game-info {
    padding: 15px;
}

.game-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.game-genre {
    display: inline-block;
    padding: 4px 10px;
    background: #2a2a4a;
    border-radius: 15px;
    font-size: 12px;
    color: #8888bb;
}

.game-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Play button overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background: rgba(102, 126, 234, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.game-card:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1);
}

/* Single Game Page */
.single-game {
    max-width: 1200px;
    margin: 0 auto;
}

.game-player {
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.game-player iframe {
    width: 100%;
    height: 600px;
    border: none;
}

.game-details {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #2a2a4a;
}

.game-full-title {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 15px;
}

.game-description {
    color: #8888bb;
    line-height: 1.8;
    font-size: 16px;
}

.game-meta {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.meta-tag {
    padding: 8px 16px;
    background: #2a2a4a;
    border-radius: 20px;
    font-size: 14px;
}

/* Kategorije */
.category-header {
    margin-bottom: 30px;
}

.category-title {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 10px;
}

.category-description {
    color: #8888bb;
    font-size: 16px;
}

/* Hero sekcija */
.page-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #2a1a4e 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid #3a2a6a;
}

.page-hero h1 {
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 10px;
}

.page-hero p {
    color: #8888bb;
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .game-player iframe {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .sidebar-container {
        transform: translateX(-100%);
    }
    
    .sidebar-container.mobile-open {
        transform: translateX(0);
        width: 220px !important;
    }
    
    .sidebar-container.mobile-open .sidebar-label {
        opacity: 1;
        width: auto;
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-center {
        margin: 0 10px;
    }
    
    .game-player iframe {
        height: 300px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}