:root {
    --bg-main: #0a0a0c;
    --bg-card: #141418;
    --bg-input: #1f1f26;
    --border-color: #2a2a35;
    --text-main: #f0f0f5;
    --text-muted: #8a8a9e;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --body-bg: #0a0a0c;
}

[data-theme="light"] {
    --bg-main: #f5f5f7;
    --bg-card: #ffffff;
    --bg-input: #ececf0;
    --border-color: #d8d8e0;
    --text-main: #1a1a1a;
    --text-muted: #6b6b6b;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --body-bg: #f5f5f7;
}

[data-theme="turbo"] {
    --bg-main: rgba(255, 255, 255, 0.1);
    --bg-card: rgba(0, 0, 0, 0.15);
    --bg-input: rgba(0, 0, 0, 0.2);
    --border-color: rgba(0, 0, 0, 0.25);
    --text-main: #1a0000;
    --text-muted: #4a0000;
    --accent-color: #8b0000;
    --accent-hover: #a00000;
    --body-bg: linear-gradient(135deg, #ffcc00 0%, #ff6600 50%, #cc0000 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--body-bg);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 480px; /* Mobilni prikaz primarno */
    background-color: var(--bg-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 70px; /* Mesto za bottom nav */
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* Header Navbar */
.top-nav {
    height: 60px;
    background-color: var(--bg-card);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
    text-decoration: none;
}

.brand-logo span {
    color: var(--accent-color);
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    height: 60px;
    background-color: var(--bg-card);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-item.active {
    color: var(--accent-color);
}

.plus-btn {
    width: 44px;
    height: 44px;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none; /* Sakriveno po defaultu */
    justify-content: center;
    align-items: flex-end; /* Modal se pojavljuje odozdo */
    z-index: 2000;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 480px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Modal Steps */
.modal-step {
    display: none;
}

.modal-step.active {
    display: block;
}

/* Modal Action Buttons (Step 1) */
.modal-action-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 15px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.2s;
}

.modal-action-btn:hover {
    background-color: var(--border-color);
}

.modal-action-btn .icon {
    font-size: 1.5rem;
}

.modal-action-btn strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 2px;
}

.modal-action-btn p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Form Styles inside Modal */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.form-control, 
input[type="file"],
textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
}

.form-help {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Category Chips (Radio) */
.category-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-chip {
    position: relative;
    cursor: pointer;
}

.category-chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.category-chip span {
    display: inline-block;
    padding: 8px 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.category-chip input:checked + span {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* Dodatno za like dugme */
.like-btn span {
    font-size: 0.9rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    .app-container {
        max-width: 630px;
    }
    .bottom-nav {
        max-width: 630px;
    }
}

.nav-icon {
    position: relative;
    display: inline-flex;
}

.nav-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.nav-link {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: var(--accent-hover);
}

/* Engine efekat za dugmad */
@keyframes enginePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

@keyframes engineShake {
    0%, 100% { transform: scale(0.97) rotate(0deg); }
    25% { transform: scale(0.97) rotate(-1deg); }
    75% { transform: scale(0.97) rotate(1deg); }
}

.btn-primary,
.follow-btn,
.btn-secondary,
.like-btn,
.post-delete-btn,
.chat-form button {
    transition: transform 0.15s ease, box-shadow 0.25s ease;
}

.btn-primary:hover,
.follow-btn:hover,
.btn-secondary:hover,
.like-btn:hover,
.chat-form button:hover {
    animation: enginePulse 0.8s ease-in-out infinite;
}

.btn-primary:active,
.follow-btn:active,
.btn-secondary:active,
.like-btn:active,
.chat-form button:active {
    animation: engineShake 0.2s ease-in-out;
}

.post-delete-btn:hover {
    animation: none; /* delete ne pulsira */
    transform: scale(1.1);
}

.post-delete-btn:active {
    transform: scale(0.9);
}

[data-theme="turbo"] .btn-primary:hover,
[data-theme="turbo"] .follow-btn:hover,
[data-theme="turbo"] .btn-secondary:hover,
[data-theme="turbo"] .like-btn:hover,
[data-theme="turbo"] .chat-form button:hover {
    animation: enginePulseTurbo 0.8s ease-in-out infinite;
}

@keyframes enginePulseTurbo {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.6);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 6px rgba(139, 0, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 0, 0, 0);
    }
}

/* Turbo tema - glow efekat */
[data-theme="turbo"] .tab-btn.active {
    color: #fff;
    border-bottom-color: #ffcc00;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.6);
}

[data-theme="turbo"] .filter-chip.active {
    background-color: #8b0000;
    border-color: #ffcc00;
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.5), 0 0 4px rgba(255, 204, 0, 0.8);
}

[data-theme="turbo"] .nav-item.active {
    color: #ffcc00;
    filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.7));
}

[data-theme="turbo"] .plus-btn {
    background-color: #8b0000;
    box-shadow: 0 0 16px rgba(255, 204, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="turbo"] .btn-primary,
[data-theme="turbo"] .follow-btn {
    background-color: #8b0000;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

[data-theme="turbo"] .btn-primary:hover,
[data-theme="turbo"] .follow-btn:hover {
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.7);
}

/* Custom scrollbar - Webkit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 4px;
    border: 2px solid var(--bg-main);
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

::-webkit-scrollbar-corner {
    background: var(--bg-main);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #2563eb var(--bg-main);
}

/* Turbo tema - crveno-zuti scrollbar */
[data-theme="turbo"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffcc00 0%, #cc0000 100%);
    border: 2px solid rgba(0, 0, 0, 0.3);
}

[data-theme="turbo"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffdd33 0%, #e60000 100%);
}

[data-theme="turbo"] * {
    scrollbar-color: #cc0000 rgba(0, 0, 0, 0.3);
}

/* Light tema - sivi scrollbar sa plavim akcentom */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #ececf0;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #b8b8c0;
    border: 2px solid #ececf0;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}
