/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f29;
    --bg-tertiary: #232936;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --border-color: #374151;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --rare: #4ade80;
    --epic: #a78bfa;
    --legendary: #fbbf24;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    padding-top: 50px;
}

/* News Ticker */
.news-ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, #1e2530 0%, #2a3441 100%);
    border-bottom: 2px solid var(--accent-primary);
    display: flex;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.ticker-wrapper {
    flex: 1;
    overflow: hidden;
}

.ticker-label {
    background: var(--accent-primary);
    color: white;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(99, 102, 241, 0.3);
    z-index: 2;
}

.ticker-label i {
    font-size: 1rem;
}

.ticker-content {
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
}

.ticker-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 0 1rem;
    height: 100%;
    border-left: 1px solid var(--border-color);
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticker-item:first-child {
    border-left: none;
}

.ticker-item i {
    color: var(--accent-primary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ticker-item span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticker-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    cursor: pointer;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 50px;
    height: calc(100vh - 50px);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-primary);
}

.logo i {
    font-size: 1.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem;
}

.sidebar-nav h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.sidebar-nav ul {
    list-style: none;
    margin-bottom: 2rem;
}

.sidebar-nav ul li {
    margin-bottom: 0.5rem;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sidebar-nav ul li a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-nav ul li.active a {
    background: var(--accent-primary);
    color: white;
}

.sidebar-nav ul li a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stats {
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.stat-item i {
    font-size: 1.25rem;
    color: var(--accent-primary);
}

.stat-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-item strong {
    margin-left: auto;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sidebar-footer p {
    margin-bottom: 0.25rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    max-width: calc(100% - 280px);
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s;
}

.info-card:hover {
    transform: translateY(-2px);
}

.info-card i {
    font-size: 2rem;
    color: var(--accent-primary);
}

.info-card h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.info-card .badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.info-card .badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.info-card small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Filters Panel */
.filters-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filters-panel h3 {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-input,
.filter-select,
.filter-input-small {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-input:focus,
.filter-select:focus,
.filter-input-small:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

.filter-input::placeholder {
    color: var(--text-secondary);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-secondary);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
}

/* Results Info */
.results-info {
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border-left: 3px solid var(--accent-primary);
}

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

.results-info strong {
    color: var(--text-primary);
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.item-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
    border-color: var(--accent-primary);
}

.item-card:hover::before {
    opacity: 1;
}

.item-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    color: var(--accent-primary);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.item-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.item-level {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.item-category {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-rare {
    background: rgba(74, 222, 128, 0.2);
    color: var(--rare);
}

.badge-epic {
    background: rgba(167, 139, 250, 0.2);
    color: var(--epic);
}

.badge-very-rare {
    background: rgba(251, 191, 36, 0.2);
    color: var(--legendary);
}

.badge-vocation {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.item-stats {
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.item-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.item-stats .stat i {
    color: var(--accent-primary);
    width: 16px;
}

.item-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--legendary);
    margin-bottom: 1rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-compare,
.btn-details {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-compare {
    background: var(--accent-primary);
    color: white;
}

.btn-compare:hover {
    background: var(--accent-secondary);
}

.btn-details {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    flex: 0;
    padding: 0.75rem 1rem;
}

.btn-details:hover {
    background: var(--bg-primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.page-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    font-weight: 600;
}

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

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results p {
    font-size: 1.1rem;
}

/* Utilities */
.mt-4 {
    margin-top: 2rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 9999;
    min-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification i {
    font-size: 1.25rem;
}

.notification-success {
    border-left: 3px solid var(--success);
}

.notification-success i {
    color: var(--success);
}

.notification-error {
    border-left: 3px solid var(--danger);
}

.notification-error i {
    color: var(--danger);
}

.notification-warning {
    border-left: 3px solid var(--warning);
}

.notification-warning i {
    color: var(--warning);
}

.notification-info {
    border-left: 3px solid var(--accent-primary);
}

.notification-info i {
    color: var(--accent-primary);
}

/* Compare Indicator */
.compare-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.item-card.in-compare {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(99, 102, 241, 0.1) 100%);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    position: fixed;
    top: 1rem;
    left: 1rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 0.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    backdrop-filter: blur(2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
        max-width: calc(100% - 240px);
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .ticker-item span {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 100;
        top: 50px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 1rem;
        padding-top: 80px;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    /* Ticker na mobile - ukryj 2 ostatnie */
    .ticker-item:nth-child(3),
    .ticker-item:nth-child(4) {
        display: none;
    }
    
    .ticker-item {
        font-size: 0.75rem;
    }
    
    .ticker-label {
        padding: 0 1rem;
        font-size: 0.75rem;
    }
}