/* ==========================================================================
   PRANGER DRUŽINSKI HUB (pranger.win) - STYLESHEET v1.1
   Mobile-First, Netflix-Style Profile Selector, Dark Glassmorphism,
   1-na-1 Chat, Skupni Koledar in Home Assistant
   ========================================================================== */
@import url('strategy.css');

:root {
    --bg-main: #0a0a0f;
    --bg-card: #13131a;
    --bg-card-hover: #1c1c24;
    --bg-input: #1b1b22;
    --border-color: #262633;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --purple: #a855f7;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --nav-height: 68px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    user-select: none;
}

/* ==================== NETFLIX PROFILE SELECTOR ==================== */
.profile-selection-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 25%, #181928 0%, #0c0d14 55%, #06070a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.profile-selection-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand-logo span.icon {
    font-size: 40px;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.45));
    animation: floatIcon 3s ease-in-out infinite alternate;
}

@keyframes floatIcon {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

.brand-logo h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.selection-title {
    font-size: 21px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 32px;
    text-align: center;
    letter-spacing: -0.3px;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .profiles-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 760px;
        gap: 20px;
    }
}

.profile-card {
    background: rgba(19, 19, 28, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 22px 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    position: relative;
}

.profile-card:hover, .profile-card:active {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--profile-color, var(--accent));
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px var(--profile-glow, var(--accent-glow));
    background: rgba(26, 26, 38, 0.9);
}

.profile-avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 3.5px solid var(--profile-color, var(--accent));
    box-shadow: 0 0 16px var(--profile-glow, var(--accent-glow));
    overflow: hidden;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 640px) {
    .profile-avatar-circle {
        width: 88px;
        height: 88px;
        font-size: 42px;
    }
}

.profile-card:hover .profile-avatar-circle {
    transform: scale(1.06);
}

.profile-avatar-circle img,
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
    display: block;
}

.profile-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: -0.2px;
}

.profile-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==================== TOUCH PIN KEYPAD MODAL ==================== */
.pin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 8, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pin-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pin-modal {
    background: rgba(18, 19, 28, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 28px 24px 22px;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(99, 102, 241, 0.15);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.92) translateY(18px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.pin-target-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.pin-target-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2.5px solid var(--accent);
    box-shadow: 0 0 14px var(--accent-glow);
    font-size: 28px;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.pin-target-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
}

.pin-target-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.pin-prompt {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.pin-indicators {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.pin-dot {
    width: 15px;
    height: 15px;
    border-radius: var(--radius-full);
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pin-dot.filled {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    transform: scale(1.15);
}

.pin-dot.error {
    border-color: var(--danger);
    background: var(--danger);
    box-shadow: 0 0 14px var(--danger);
}

.keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 250px;
}

.keypad-btn {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.keypad-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.keypad-btn:active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    transform: scale(0.92);
}

.keypad-btn.action {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border-color: transparent;
}

.keypad-btn.action:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.keypad-btn.action:active {
    background: rgba(255, 255, 255, 0.1);
}

.modal-close-btn {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 24px;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.shake {
    animation: shakeAnim 0.4s ease-in-out;
}

@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* ==================== MAIN APPLICATION APP SHELL ==================== */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    background: var(--bg-main);
}

.app-header {
    height: 60px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.header-user-info:hover {
    opacity: 0.88;
}

.header-user-info:active {
    transform: scale(0.97);
}

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid var(--accent);
    position: relative;
}

.header-user-text h2 {
    font-size: 15px;
    font-weight: 700;
}

.header-user-text span {
    font-size: 11px;
    color: var(--text-muted);
}

.header-switch-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Main Tab Views */
.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px calc(var(--nav-height) + 16px);
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* ==================== CHAT VIEW & SUBTABS ==================== */
.chat-subtabs-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 8px;
    scrollbar-width: none;
}

.chat-subtabs-bar::-webkit-scrollbar {
    display: none;
}

.subtab-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.subtab-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 12px var(--accent-glow);
}

.chat-banner-target {
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 6px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-messages-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-bottom: 12px;
}

.chat-bubble {
    display: flex;
    gap: 10px;
    max-width: 88%;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-bubble.assistant {
    align-self: flex-start;
}

.bubble-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.bubble-body {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    word-break: break-word;
    user-select: text;
}

.chat-bubble.user .bubble-body {
    background: linear-gradient(135deg, var(--accent) 0%, #4338ca 100%);
    border-color: var(--accent);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.chat-bubble.assistant .bubble-body {
    border-bottom-left-radius: 4px;
}

.bubble-sender-name {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.chat-bubble.user .bubble-sender-name {
    color: rgba(255, 255, 255, 0.8);
    text-align: right;
}

.bubble-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: right;
}

.chat-bubble.user .bubble-time {
    color: rgba(255, 255, 255, 0.6);
}

.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin-top: auto;
}

.chat-input-field {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    padding: 6px 0;
}

.chat-input-field::placeholder {
    color: var(--text-muted);
}

.chat-btn-action {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-btn-action.send {
    background: var(--accent);
    color: #ffffff;
}

.chat-btn-action.mic.active {
    background: var(--danger);
    color: #ffffff;
    animation: micPulse 1.2s infinite;
}

.chat-btn-action.ai-toggle {
    width: auto;
    min-width: 44px;
    height: 38px;
    padding: 0 10px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    cursor: pointer;
}

.chat-btn-action.ai-toggle:hover,
.chat-btn-action.ai-toggle.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    border-color: #a5b4fc;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
    transform: scale(1.05);
}

@keyframes micPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==================== KOLEDAR (CALENDAR & TASKS) ==================== */
.calendar-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.calendar-date-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.calendar-current-date-text {
    font-size: 15px;
    font-weight: 700;
}

.btn-add-item {
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 12px var(--accent-glow);
}

.calendar-view-switcher,
.calendar-header-bar,
.calendar-filters-bar {
    flex-shrink: 0;
}

.calendar-filters-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 14px 2px;
    margin-bottom: 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 10;
    min-height: 48px;
    align-items: center;
}

.calendar-filters-bar::-webkit-scrollbar {
    display: none;
}

.cal-filter-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    height: 32px;
    transition: all 0.2s ease;
}

.cal-filter-pill.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    color: #ffffff;
}

.calendar-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.cal-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all 0.2s ease;
    -webkit-touch-callout: none;
}

/* Plavajoči meni za reakcije (Srček ❤️ ali Palec dol 👎) ob daljšem pritisku */
.cal-reactions-popover {
    position: absolute;
    top: -46px;
    left: 50%;
    transform: translateX(-50%) scale(0.85);
    background: #1e1e2d;
    border: 1px solid #6366f1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 14px rgba(99, 102, 241, 0.5);
    border-radius: var(--radius-full);
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cal-reactions-popover.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
}

.cal-reaction-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 6px;
    transition: transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
}

.cal-reaction-btn:hover,
.cal-reaction-btn:active {
    transform: scale(1.3);
    background: rgba(255, 255, 255, 0.1);
}

.cal-reactions-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.cal-reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.cal-reaction-badge:hover {
    background: rgba(255, 255, 255, 0.12);
}

.cal-reaction-badge.active.like {
    background: rgba(239, 68, 68, 0.22);
    border-color: #ef4444;
    color: #fca5a5;
    font-weight: 700;
}

.cal-reaction-badge.active.dislike {
    background: rgba(59, 130, 246, 0.22);
    border-color: #3b82f6;
    color: #93c5fd;
    font-weight: 700;
}

.cal-reaction-add-btn {
    background: none;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    padding: 2px 7px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cal-reaction-add-btn:hover {
    border-color: var(--accent);
    color: #ffffff;
}

.cal-card.completed {
    opacity: 0.55;
    background: rgba(19, 19, 26, 0.5);
}

.cal-card.completed .cal-card-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.cal-card-checkbox {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: transparent;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.cal-card.completed .cal-card-checkbox {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.cal-card-content {
    flex: 1;
}

.cal-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cal-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.cal-tag.school { background: rgba(168, 85, 247, 0.2); color: var(--purple); border: 1px solid rgba(168, 85, 247, 0.4); }
.cal-tag.chore { background: rgba(16, 185, 129, 0.2); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.4); }
.cal-tag.note { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.cal-tag.event { background: rgba(245, 158, 11, 0.2); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.4); }

.cal-time {
    font-size: 11px;
    color: var(--text-muted);
}

.cal-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cal-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.cal-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.cal-assignee {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cal-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.cal-delete-btn:hover {
    color: var(--danger);
}

/* ==================== SMART HOME TAB VIEW ==================== */
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.allowlist-badge {
    font-size: 11px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.home-category-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 16px 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.device-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.device-card.on {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.device-card.sensor-card {
    background: rgba(255, 255, 255, 0.02);
}

.device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.device-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.device-card.on .device-icon-box {
    background: var(--accent);
    color: #ffffff;
}

.device-info h4 {
    font-size: 15px;
    font-weight: 700;
}

.device-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.sensor-value-box {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    text-align: right;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--border-color);
    border-radius: 34px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .toggle-slider {
    background-color: var(--accent);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* ==================== SETTINGS TAB VIEW ==================== */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==================== PROFILNA SLIKA & PRILAGODITVE ==================== */
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
    display: block;
}

.profile-avatar-circle,
.header-avatar,
.bubble-avatar,
.pin-target-avatar {
    overflow: hidden;
}

.settings-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.settings-avatar-wrapper {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.settings-avatar-circle {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    border: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
    box-shadow: 0 0 16px var(--accent-glow);
    transition: transform 0.2s ease;
}

.settings-avatar-wrapper:hover .settings-avatar-circle {
    transform: scale(1.05);
}

.settings-avatar-edit-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border: 2px solid var(--bg-card);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #ffffff;
}

.settings-role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-top: 4px;
}

.avatar-modal-preview {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    border: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    overflow: hidden;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-upload-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload-avatar:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: #818cf8;
}

.avatar-presets-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding: 6px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.avatar-preset-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.avatar-preset-btn:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.15);
}

.avatar-preset-btn.active {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 10px var(--accent-glow);
    transform: scale(1.1);
}

.profile-color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 4px 0;
}

.profile-color-dot {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-color-dot:hover {
    transform: scale(1.2);
}

.profile-color-dot.active {
    border-color: #ffffff;
    transform: scale(1.25);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
}

.settings-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-input, .settings-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    width: 100%;
    margin-bottom: 10px;
    outline: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
}

/* ==================== BOTTOM NAVIGATION BAR ==================== */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 720px;
    height: var(--nav-height);
    background: rgba(13, 13, 18, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 99;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 10px;
    transition: all 0.2s ease;
    flex: 1;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: 0.2s;
}

.nav-item span {
    font-size: 11px;
    font-weight: 600;
}

/* Modal Form Za Vnos v Koledar */
.entry-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1150;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.entry-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.entry-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.entry-modal h3 {
    font-size: 17px;
    font-weight: 700;
}

/* Custom Alert Banner */
.toast-banner {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 42, 0.95);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.toast-banner.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(4px);
}/* ==================== QUIZ VIEW STYLES ==================== */
.quiz-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 14px;
}

.quiz-fairplay-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 12px;
    color: #c7d2fe;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.quiz-lobby-players {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 16px 0;
}

.quiz-player-slot {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-player-slot.ready {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.08);
}

.quiz-timer-bar-wrap {
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    margin: 8px 0;
}

.quiz-timer-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
    transition: width 1s linear;
}

.quiz-question-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 12px;
}

.quiz-question-text {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

.quiz-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 480px) {
    .quiz-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quiz-option-btn {
    min-height: 64px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    user-select: none;
}

.quiz-option-btn:active {
    transform: scale(0.96);
}

.quiz-option-btn.opt-0 { background: #ec4899; } /* Roza/Rdeča */
.quiz-option-btn.opt-1 { background: #3b82f6; } /* Modra */
.quiz-option-btn.opt-2 { background: #10b981; } /* Zelena */
.quiz-option-btn.opt-3 { background: #f59e0b; } /* Oranžna */

.quiz-option-btn.selected {
    box-shadow: 0 0 0 3px #ffffff, 0 0 20px rgba(255, 255, 255, 0.5);
    transform: scale(1.02);
}

.quiz-option-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

.quiz-option-letter {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

/* Rezultati & Lestvica */
.quiz-result-badge {
    text-align: center;
    padding: 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
}

.quiz-result-badge.correct {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.quiz-result-badge.wrong {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.quiz-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0;
}

.quiz-lb-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz-lb-row.first {
    border-color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

/* Zmagovalni Podij */
.quiz-podium-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    height: 220px;
    margin: 24px 0;
}

.podium-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 90px;
}

.podium-pillar {
    width: 100%;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
}

.podium-col.rank-1 .podium-pillar { height: 130px; background: linear-gradient(180deg, #f59e0b, #b45309); }
.podium-col.rank-2 .podium-pillar { height: 95px; background: linear-gradient(180deg, #94a3b8, #475569); }
.podium-col.rank-3 .podium-pillar { height: 70px; background: linear-gradient(180deg, #b45309, #78350f); }

/* ==================== KOLEDAR MULTI-VIEW & NAKUPI ==================== */
.calendar-view-switcher {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 4px;
    margin-bottom: 12px;
}

.cal-view-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 4px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.cal-view-btn.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 12px var(--accent-glow);
}

.cal-view-btn.shopping-pill.active {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.cal-today-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cal-today-btn:active {
    background: var(--accent);
    color: #ffffff;
}

/* Tedenski trak */
.cal-week-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.cal-week-day-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cal-week-day-card:hover, .cal-week-day-card.selected {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.cal-week-day-card.selected {
    box-shadow: 0 0 12px var(--accent-glow);
}

.cal-week-day-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.cal-week-day-num {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.cal-week-day-card.today .cal-week-day-num {
    color: var(--accent);
}

.cal-day-dots {
    display: flex;
    gap: 3px;
    min-height: 6px;
}

.cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

/* Mesečni pogled */
.cal-month-weekdays-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.cal-month-cell {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cal-month-cell:hover, .cal-month-cell.selected {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.15);
}

.cal-month-cell.today {
    border-color: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.cal-month-cell.other-month {
    opacity: 0.35;
}

.cal-cell-num {
    font-size: 12px;
    font-weight: 700;
}

/* Letni pogled */
.cal-year-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cal-year-month-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.cal-year-month-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.cal-year-month-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cal-year-month-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* Nakupovalni seznam */
.shopping-quick-add-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.shopping-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.shopping-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.btn-clean-shopping {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
}

.btn-clean-shopping:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.shopping-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.shopping-item-row.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.shopping-checkbox {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.shopping-checkbox.checked {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

/* ==================== KVIZ 3 V VRSTO (TIC-TAC-TOE TRIVIA) ==================== */
.ttt-teams-intro-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 0;
}

.ttt-team-card {
    flex: 1;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ttt-team-card.kids-team {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.ttt-team-card.parents-team {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.08);
}

.ttt-team-symbol {
    font-size: 32px;
    margin-bottom: 4px;
}

.ttt-team-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.ttt-team-members {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.ttt-vs-badge {
    font-size: 13px;
    font-weight: 900;
    color: #fbbf24;
    padding: 6px 8px;
    background: rgba(251, 191, 36, 0.15);
    border-radius: var(--radius-full);
}

.quiz-turn-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 12px;
}

.turn-indicator {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    from { opacity: 0.85; transform: scale(0.99); }
    to { opacity: 1; transform: scale(1.02); }
}

.score-indicator {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

/* 3x3 MREŽA */
.ttt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 16px;
}

.ttt-cell {
    aspect-ratio: 1;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    user-select: none;
    touch-action: manipulation;
}

.ttt-cell:hover:not(.claimed) {
    transform: scale(1.04);
    border-color: var(--accent);
}

.ttt-cell.claimed {
    cursor: default;
}

.ttt-cell.claimed-kids {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.18);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.ttt-cell.claimed-parents {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.18);
    box-shadow: 0 0 16px rgba(236, 72, 153, 0.4);
}

.ttt-cell.winning-cell {
    animation: winFlash 0.8s infinite alternate;
    border-width: 3px;
}

@keyframes winFlash {
    from { transform: scale(1); box-shadow: 0 0 15px #fbbf24; }
    to { transform: scale(1.06); box-shadow: 0 0 30px #f59e0b; }
}

.ttt-cell-cat-icon {
    font-size: 26px;
    margin-bottom: 2px;
}

.ttt-cell-cat-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.1;
}

.ttt-cell-symbol {
    font-size: 46px;
    font-weight: 900;
    line-height: 1;
}

/* ==================== ZAVIHEK BOTI (TELEGRAM AGENTI) ==================== */
#tab-bots {
    display: none;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--nav-height));
    padding: 0;
    overflow: hidden;
}

#tab-bots.active {
    display: flex;
}

.bots-list-view {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 30px;
}

.bots-header-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
}

.bots-header-banner h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: var(--text-primary);
}

.bots-header-banner p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.bots-catalog-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bot-catalog-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.bot-catalog-card:hover, .bot-catalog-card:active {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.bot-card-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.bot-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid var(--bg-card);
    border-radius: 50%;
}

.bot-card-body {
    flex: 1;
    min-width: 0;
}

.bot-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.bot-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bot-card-name {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.bot-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.bot-card-time {
    font-size: 11px;
    color: var(--text-muted);
}

.bot-card-preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bot-card-preview {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.bot-unread-pill {
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* Pogled klepeta z botom */
.bot-chat-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.bot-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.bot-back-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    cursor: pointer;
}

.bot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bot-header-emoji {
    font-size: 24px;
}

.bot-header-info h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.bot-typing-indicator {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    animation: typingPulse 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.1); opacity: 1; }
}

/* Quick chips */
.bot-quick-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    scrollbar-width: none;
    flex-shrink: 0;
}
.bot-quick-chips::-webkit-scrollbar { display: none; }

.bot-quick-chip {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.bot-quick-chip:hover, .bot-quick-chip:active {
    background: var(--bg-input);
    border-color: #3b82f6;
    color: var(--text-primary);
}

/* Messages area */
.bot-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bot-msg-row {
    display: flex;
    width: 100%;
}
.bot-msg-row.row-user {
    justify-content: flex-end;
}
.bot-msg-row.row-bot {
    justify-content: flex-start;
}

.bot-msg-bubble {
    max-width: 85%;
    padding: 12px 14px;
    border-radius: 16px;
    position: relative;
    word-break: break-word;
    line-height: 1.45;
    font-size: 14px;
}

.bot-msg-user {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.bot-msg-bot {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.bot-msg-text {
    margin-bottom: 4px;
}
.bot-msg-text a {
    color: #60a5fa;
    text-decoration: underline;
}
.bot-msg-text code {
    background: rgba(0, 0, 0, 0.35);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}
.bot-msg-text pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: monospace;
    font-size: 12px;
}

.bot-msg-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
    margin-top: 4px;
}

.bot-photo-wrapper {
    margin-bottom: 8px;
}
.bot-msg-photo {
    max-width: 100%;
    max-height: 280px;
    border-radius: 10px;
    display: block;
}

.bot-msg-doc-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
}
.bot-doc-icon { font-size: 24px; }
.bot-doc-info { display: flex; flex-direction: column; gap: 2px; }
.bot-doc-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.bot-doc-dl-btn { font-size: 11px; color: #60a5fa; text-decoration: none; font-weight: 600; }

/* Inline keyboard buttons */
.bot-inline-keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.bot-btn-row {
    display: flex;
    gap: 6px;
}
.bot-inline-btn {
    flex: 1;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #93c5fd;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
}
.bot-inline-btn:hover, .bot-inline-btn:active {
    background: rgba(59, 130, 246, 0.25);
    border-color: #60a5fa;
    color: #fff;
}
.bot-inline-btn.btn-loading {
    opacity: 0.6;
    pointer-events: none;
}

.bot-welcome-box {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto 0;
}

.nav-badge-bubble {
    position: absolute;
    top: 4px;
    right: 22%;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 10px;
    padding: 1px 5px;
    line-height: 1.2;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}
