* { margin:0; padding:0; box-sizing:border-box; }
:root {
    --primary: #2c5282;
    --primary-dark: #1a365d;
    --accent: #ffd700;
    --accent-light: #fff3cd;
    --bg: #f8fafc;
    --text: #1a202c;
    --text-light: #4a5568;
    --border: #e2e8f0;
    --white: #ffffff;
    --danger: #dc3545;
    --arabic-color: #0a5c2e;
}
body { 
    font-family: 'Open Sans', sans-serif; 
    background: var(--bg); 
    color: var(--text); 
    line-height: 1.6; 
}
.container { max-width: 600px; margin: 0 auto; padding: 12px; }

/* HEADER */
header { 
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
    color: white; 
    padding: 8px 0;
    border-radius: 0 0 16px 16px;
    margin-bottom: 10px;
}
.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 12px;
}
.logo { display: flex; align-items: center; gap: 6px; }
.logo-icon { font-size: 1.5rem; }
.logo-text { font-size: 1rem; font-weight: 600; }
.logo-text span { color: var(--accent); }

/* IKRE */
.ikre-section {
    text-align: center;
    padding: 8px 12px;
}
.ikre-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    color: #d4edc9;
    line-height: 1.8rem;
}
.ikre-translation {
    font-size: 0.8rem;
    color: #e2e8f0;
    font-style: italic;
}

/* FILTER SELECT */
.filter-select-container { margin: 10px 12px; }
#kategorijaSelect {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 1rem;
    background: white;
    -webkit-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

/* HAMBURGER MENI */
.menu-btn { 
    font-size: 2rem; 
    background: none; 
    border: none; 
    color: white; 
    cursor: pointer; 
    padding: 0 10px;
}
.main-menu { 
    position: fixed; 
    top: 0; 
    left: -100%; 
    width: 85%; 
    max-width: 300px; 
    height: 100vh; 
    background: white; 
    box-shadow: 2px 0 20px rgba(0,0,0,0.2); 
    z-index: 10001; 
    transition: left 0.3s; 
    overflow-y: auto; 
}
.main-menu.active { left: 0; }
.menu-header { 
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
    color: white; 
    padding: 20px; 
}
.menu-close { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    background: none; 
    border: none; 
    color: white; 
    font-size: 2rem; 
    cursor: pointer; 
}

.menu-items { list-style: none; padding: 0; margin: 0; }
.menu-items li { border-bottom: 1px solid var(--border); }
.menu-items li a, .menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    background: white;
}
.menu-items li a:hover, .menu-toggle:hover {
    background: var(--accent-light);
    color: var(--primary);
}

/* Submenu */
.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f1f5f9;
    display: none;
}
.submenu.active { display: block; }
.submenu li { border-bottom: 1px dashed #cbd5e0; }
.submenu li a {
    padding-left: 40px;
    background: #f8fafc;
    font-size: 0.9rem;
}
.submenu li a:hover { background: var(--accent-light); }

.menu-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    z-index: 10000; 
    display: none; 
}
.menu-overlay.active { display: block; }

/* AJETI GRID */
.ajeti-grid { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    margin: 10px 0 20px;
}
.ajet-card { 
    background: white; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
    border: 1px solid var(--border); 
}
.card-header { 
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
    color: white; 
    padding: 10px 12px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    font-size: 0.9rem;
}
.sura-number { 
    background: rgba(255,255,255,0.2); 
    padding: 3px 8px; 
    border-radius: 20px; 
    font-size: 0.75rem; 
}
.arabic-card { 
    font-family: 'Amiri'; 
    font-size: 1.2rem; 
    line-height: 1.8rem; 
    text-align: right; 
    padding: 15px; 
    background: #faf9f7; 
    color: var(--arabic-color); 
    min-height: 80px;
}
.prijevod-card {
    padding: 8px 12px;
    font-size: 0.9rem;
    color: var(--text);
    background: white;
    border-bottom: 1px solid var(--border);
    font-style: italic;
}
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.btn-detalji { 
    margin: 12px; 
    padding: 10px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 0.9rem;
    cursor: pointer; 
    width: calc(100% - 24px);
}

/* PAGINACIJA */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0 30px;
    padding: 10px;
}
.page-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
}
.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}
#pageInfo { font-size: 0.9rem; color: var(--text-light); }

/* SPINNER */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* NOTIFIKACIJA */
.notification { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    padding: 12px 20px; 
    border-radius: 8px; 
    color: white; 
    z-index: 10002; 
    display: none; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    font-size: 0.9rem;
}
.notification.success { background: #28a745; }
.notification.error { background: #dc3545; }