:root {
    --bg: #FBFBFD;
    --blue: #007AFF;
    --text: #1d1d1f;
    --light-gray: #F5F5F7;
    --border: #d2d2d7;
    --msg-visitor: #E9E9EB;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* --- Navbar --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--blue);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    background: #eee;
    border-radius: 20px;
    padding: 2px;
}

.lang-btn {
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 18px;
    transition: 0.2s;
    color: #8e8e93;
}

.lang-btn.active {
    background: white;
    color: var(--text);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 15px;
    transition: 0.2s;
    cursor: pointer;
}

.nav-links a:hover {
    color: var(--blue);
}

.btn-login {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--light-gray);
}

/* --- Hero Section --- */
header {
    text-align: center;
    padding: 80px 20px 40px;
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 20px;
    line-height: 1.1;
    transition: font-size 0.3s;
}

p.subtitle {
    font-size: 20px;
    color: #86868b;
    line-height: 1.5;
    margin-bottom: 40px;
}

/* --- Split Demo Section --- */
.demo-container {
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 0 20px;
    display: flex;
    gap: 40px;
    align-items: center;
}

.demo-column {
    flex: 1;
    width: 100%;
}

.demo-badge {
    display: inline-block;
    background: #E5F1FF;
    color: var(--blue);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* --- Mockups --- */
.mockup {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Agent Dashboard Mockup */
.dash-mockup {
    height: 600px;
}

.dash-header {
    padding: 15px 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.mac-dots {
    width: 12px;
    height: 12px;
    background: #ff5f56;
    border-radius: 50%;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
    margin-right: 60px;
    /* Zadržava distancu i na mobilnom */
}

.dash-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.dash-sidebar {
    width: 200px;
    border-right: 1px solid #eee;
    background: #fafafa;
    padding: 15px;
    transition: all 0.3s;
}

.dash-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.fake-chat-item {
    padding: 10px;
    background: #E5F1FF;
    border-radius: 10px;
    border-left: 3px solid var(--blue);
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
}

.fake-chat-item span {
    display: block;
    font-size: 11px;
    color: #666;
    font-weight: 400;
    margin-top: 4px;
}

/* Visitor Widget Mockup */
.widget-mockup {
    width: 100%;
    max-width: 350px;
    height: 600px;
    margin: 0 auto;
    border-radius: 40px;
    border: 8px solid #1d1d1f;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    background: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
}

.widget-header {
    background: var(--blue);
    color: white;
    padding: 20px;
    text-align: center;
    font-weight: 600;
    border-radius: 32px 32px 0 0;
}

/* --- Shared Chat Area --- */
.chat-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bubble {
    padding: 12px 16px;
    border-radius: 20px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bubble.agent {
    background: var(--blue);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bubble.visitor {
    background: var(--msg-visitor);
    color: black;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: white;
}

.input-area input {
    flex: 1;
    border-radius: 20px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    outline: none;
    font-size: 14px;
}

.input-area button {
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.input-area button:hover {
    transform: scale(1.05);
}

.typing-indicator {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin-left: 15px;
    display: none;
    height: 15px;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- ULTRA MODERN MODAL --- */
#sim-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    font-size: 18px;
    color: #8e8e93;
    transition: 0.2s;
}

.modal-close:hover {
    color: #1d1d1f;
}

.modal-card h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 800;
}

.modal-subtitle {
    color: #8e8e93;
    font-size: 14px;
    margin-bottom: 25px;
}

.modal-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    box-sizing: border-box;
    font-size: 15px;
    background: #FBFBFD;
    transition: 0.2s;
}

.modal-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.modal-btn {
    width: 100%;
    padding: 14px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-btn:hover {
    background: #0062cc;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#success-msg {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: popIn 0.4s ease forwards;
}

.check-circle {
    width: 60px;
    height: 60px;
    background: #34c759;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
}

/* --- FEATURES KARTICE --- */
.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
}

.feature-card h4 {
    font-size: 18px;
    margin: 15px 0 10px;
    font-weight: 700;
}

/* Stilizacija za manji logo u footeru */
footer .logo {
    font-size: 20px;
}

/* --- PRICING KARTICE --- */
.pricing-section {
    padding: 80px 20px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    align-items: center;
    /* Omogućava da srednja kartica bude viša */
}

.pricing-card {
    background: white;
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.pricing-card h3 {
    margin: 0 0 15px;
    font-size: 22px;
    font-weight: 700;
}

.price {
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 10px;
}

.period {
    font-size: 15px;
    color: #8e8e93;
    font-weight: 500;
    letter-spacing: 0;
}

.pricing-desc {
    color: #8e8e93;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.4;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
    flex: 1;
    /* Gura dugme na dno */
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.pricing-features li {
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.check {
    color: var(--blue);
    font-weight: bold;
}

.pricing-btn {
    width: 100%;
    padding: 14px;
    background: #E5F1FF;
    color: var(--blue);
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.pricing-btn:hover {
    background: #cce3ff;
}

.pricing-btn.outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.pricing-btn.outline:hover {
    border-color: #8e8e93;
}

/* Istaknuta Pro kartica */
.pricing-card.popular {
    background: var(--blue);
    color: white;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 122, 255, 0.3);
    padding: 50px 30px;
    /* Malo viša od ostalih */
    z-index: 10;
}

.pricing-card.popular:hover {
    transform: translateY(-5px);
}

.pricing-card.popular .period {
    color: rgba(255, 255, 255, 0.7);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF2D55;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popular-btn {
    background: white;
    color: var(--blue);
}

.popular-btn:hover {
    background: #f0f0f0;
}


/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    nav {
        padding: 15px 20px;
    }

    .nav-controls {
        gap: 10px;
        margin-top: 15px;
        width: 100%;
        justify-content: space-between;
    }

    header {
        padding: 40px 20px 20px;
    }

    h1 {
        font-size: 38px;
    }

    p.subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .demo-container {
        flex-direction: column;
        gap: 60px;
    }

    .dash-mockup {
        height: 500px;
    }

    .widget-mockup {
        height: 500px;
        border-width: 4px;
        border-radius: 30px;
    }

    .widget-header {
        border-radius: 26px 26px 0 0;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 32px;
    }

    .dash-sidebar {
        display: none;
    }

    /* Uklonjen .mac-dots odavde kako bi zadržao 60px iz glavnog koda */
    .input-area button {
        padding: 0 15px;
    }
}