:root {
    --primary: #1e293b;
    --primary-hover: #0f172a;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --result-bg: #fef3c7;
    --result-border: #fde68a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #667eea;
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.calculator-card {
    background: var(--card-bg);
    max-width: 500px;
    width: 100%;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.hero-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #000000;
    margin: -32px -32px 24px -32px;
    padding: 16px 32px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom: 1px solid var(--border);
}

.nav-back {
    display: inline-flex;
    align-items: center;
    color: #ffffff; 
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.nav-back:hover {
    color: #ffffff;
    opacity: 0.8;
}

.lang-selector select {
    width: auto;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
}

h2 {
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-light);
    font-size: 14px;
    text-align: center;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 20px;
}

input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text);
    background-color: #fff;
    outline: none;
}

button#convertBtn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

button#convertBtn:hover {
    background-color: var(--primary-hover);
}

button:disabled {
    background: #cccccc !important;
    cursor: not-allowed;
}

#status {
    margin-top: 20px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    text-align: center;
}

.footer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-reset {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    background-color: #f1f5f9;
    color: #ef4444;
    border-color: #ef4444;
}

/* Stil for forhåndsvisningskortet som legger seg under */
#previewContainer { 
    margin-top: 24px;
    width: 100%;
    max-width: 500px;
    text-align: left; 
    padding: 24px; 
    background: white; 
    border: 1px solid var(--border);
    border-radius: 16px;
    font-family: 'Calibri', sans-serif; 
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

@media print {
    body * { display: none; }
    #previewContainer { display: block; }
}
/* Sørger for at annonseboksen har en naturlig størrelse før annonsen laster */
.ads-box {
    display: block;
    min-height: 90px; /* Gir plass til standard bannere */
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    margin: 15px auto;
    text-align: center;
    line-height: 90px; /* Sentrerer eventuell testtekst */
    color: #94a3b8;
    font-size: 12px;
}
