* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, #244a86 0%, #2f5ea8 100%);
    color: #1e1e1e;
}

.navbar {
    background-color: #1f252d;
    color: white;
    padding: 18px 0;
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
}

.nav-text {
    font-size: 14px;
    color: #b8c0cc;
}

.hero {
    padding: 100px 0 40px 0;
    position: relative;
    color: white;
    background: transparent;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to bottom, rgba(31, 60, 109, 0), #f3f5f7);
}

.hero-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hero-left {
    flex: 1;
    min-width: 320px;
}

.hero-left h1 {
    font-size: 52px;
    line-height: 1.1;
    margin: 10px 0 20px 0;
}

.hero-left p {
    font-size: 18px;
    color: #e6edf7;  /* svijetlo plava */
    line-height: 1.7;
    max-width: 700px;
}

.badge {
    display: inline-block;
    background-color: #ffffff;
    color: #1f3c6d;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: bold;
}

.hero-features {
    display: flex;
    gap: 28px;
    margin-top: 30px;
    flex-wrap: wrap;
    color: #e6edf7;
    font-size: 16px;
}

.hero-right {
    flex: 0 0 380px;
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    padding: 24px;
}

.hero-right .card,
.hero-right .card h2,
.hero-right .card label,
.hero-right .card p,
.hero-right .card span {
    color: #1f3c6d;
}

.input-card h2 {
    margin-top: 0;
}

.small-text {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0;
}

label {
    font-weight: bold;
}

input[type="text"] {
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px;
}

button {
    width: fit-content;
    padding: 14px 22px;
    border: none;
    border-radius: 10px;
    background-color: #f2b600; /* žuta */
    color: #1f3c6d; /* tamno plava */
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

button:hover {
    background-color: #d99f00;
    transform: scale(1.03);
}

button:active {
    transform: scale(0.97);
}

.main-content {
    width: 100%;
    background-color: #f3f5f7;
    padding: 60px 0;
}

.main-content-inner {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.result-box {
    background: #eef3ff;
    border-left: 5px solid #2f5ea8;
    border-radius: 10px;
    padding: 18px;
    margin-top: 20px;
}

.result-box p {
    margin-bottom: 0;
}

.placeholder-box {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #d8dde6;
    border-radius: 12px;
    background-color: #fafbfc;
    color: #666;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    color: #666;
    font-size: 14px;
}

.demo-badge {
    background-color: #28a745; /* zelena */
    color: white;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    box-shadow: 0 0 6px rgba(40, 167, 69, 0.5);
}

.preview-title {
    font-weight: bold;
    margin-bottom: 8px;
}

.preview-text {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 20px;
}

.info-card {
    background-color: #f8f9fb;
    border: 1px solid #d8dde6;
    border-radius: 12px;
    padding: 16px;
}

.info-label {
    display: block;
    color: #777;
    font-size: 13px;
    margin-bottom: 6px;
}

.footer {
    margin-top: 40px;
    padding: 30px 20px;
    text-align: center;
    color: #5f6b7a;
    font-size: 14px;
    border-top: 1px solid #d8dde6;
}

@media (max-width: 900px) {
    .hero-left h1 {
        font-size: 38px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .nav-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .hero-right {
        flex: 1 1 100%;
    }
}

.mode-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    background-color: #f8f9fb;
    border: 1px solid #d8dde6;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    background-color: #f8f9fb;
    border: 1px solid #d8dde6;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    border-color: #2f5ea8;
    background-color: #eef3ff;
}

.radio-option input[type="radio"] {
    margin: 0;
    outline: none;
}

.radio-option input[type="radio"]:focus {
    outline: none;
    box-shadow: none;
}

.radio-option span {
    user-select: none;
    outline: none;
}

.radio-option:has(input:checked) {
    border-color: #2f5ea8;
    background-color: #eef3ff;
    box-shadow: inset 0 0 0 1px #2f5ea8;
}

.radio-option *:focus {
    outline: none;
}

.upload-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hidden {
    display: none;
}

input[type="file"] {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    background-color: white;
    color: #1f3c6d;
}

input[type="text"]:focus {
    outline: none;
    border-color: #2f5ea8;
    box-shadow: 0 0 0 2px rgba(47, 94, 168, 0.2);
}

.preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

.preview-box {
    height: 280px;
    border: 2px dashed #2f5ea8;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(
        45deg,
        #f8f9fb,
        #f8f9fb 10px,
        #ffffff 10px,
        #ffffff 20px
    );
    text-align: center;
    padding: 20px;
    overflow: hidden;
}
#loading {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: #1f3c6d;
}

#loading.hidden {
    display: none !important;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(31, 60, 109, 0.2);
    border-top: 3px solid #f2b600;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.download-section {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.download-btn {
    display: inline-block;
    padding: 14px 24px;
    background-color: #f2b600; /* žuta */
    color: #1f3c6d; /* tamno plava */
    font-weight: bold;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.download-btn:hover {
    background-color: #d99f00;
    transform: translateY(-2px);
}

.download-btn:active {
    transform: scale(0.97);
}

.form-description {
    font-size: 16px;
    color: #2f5ea8;
    margin-bottom: 12px;
    font-weight: bold;
}
