:root {
    /* CSS Proměnné - Modernizovaná paleta */
    --color-primary: #7c3aed;    /* Sytější fialová */
    --color-accent: #db2777;     /* Nová: Sytá růžová/magenta pro gradienty */
    --color-secondary: #f59e0b;  /* Žluto-oranžová pro varování */
    
    --color-text: #1f2937;       /* Tmavý text */
    --color-text-light: #4b5563; /* Šedší text pro popisky */
    
    --color-background: #f3f4f6; /* Jemně šedé pozadí */
    --color-card-bg: #ffffff;
    
    --gradient-main: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    --shadow-soft: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-standard: 16px;
}

/* ZÁKLADNÍ RESET A TYPOGRAFIE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    /* Jemný barevný nádech na pozadí pro moderní look */
    background-image: radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.05) 0%, transparent 20%),
                      radial-gradient(circle at 90% 80%, rgba(219, 39, 119, 0.05) 0%, transparent 20%);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */
header {
    background: var(--gradient-main);
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
    margin-bottom: 20px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

@media (min-width: 768px) {
    header {
        border-bottom-left-radius: 50% 20px;
        border-bottom-right-radius: 50% 20px;
    }
}

header h1 {
    font-size: 2.8em;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tagline {
    font-size: 1.2em;
    opacity: 0.95;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* VSTUPNÍ SEKCE */
#input-section {
    padding: 10px 0 40px 0;
    position: relative;
    z-index: 10;
    margin-top: -30px; /* Překrytí headeru */
}

#text-input {
    width: 100%;
    padding: 20px;
    font-size: 1.3em;
    border: 2px solid transparent;
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-soft);
    resize: none;
    background: white;
    transition: all 0.3s ease;
    background-clip: padding-box;margin-top: -30px;
}

#text-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

/* OUTPUT SEKCE */
#font-output-section {
    padding: 20px 0;
}

#font-output-section h2 {
    margin-bottom: 30px;
    font-size: 1.8em;
    text-align: center;
    color: var(--color-text);
    position: relative;
    display: inline-block;
    width: 100%;
}

.font-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 25px;
}

.font-card {
    background: var(--color-card-bg);
    padding: 25px;
    border-radius: var(--radius-standard);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.font-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.font-card h3 {
    font-size: 0.9em;
    text-transform: uppercase;
    color: var(--color-text-light);
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* NÁHLED PÍSMA */
.font-preview {
    min-height: 60px;
    font-size: 1.5em;
    word-wrap: break-word;
    flex-grow: 1;
    margin-bottom: 20px;
    color: var(--color-text);
    line-height: 1.4;
}

/* UPOZORNĚNÍ */
.warning {
    background-color: #fffbeb;
    color: #92400e;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85em;
    margin-top: auto;
    margin-bottom: 15px;
    border-left: 4px solid var(--color-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* TLAČÍTKO KOPÍROVAT */
.copy-btn {
    background: var(--color-primary); /* Fallback */
    background: linear-gradient(90deg, var(--color-primary), #9333ea);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 6px rgba(124, 58, 237, 0.2);
}

.copy-btn:hover {
    background: linear-gradient(90deg, #6d28d9, var(--color-accent));
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(219, 39, 119, 0.25);
}

.copy-btn:active {
    transform: translateY(1px);
}

/* SEO sekce */
#seo-content {
    padding: 60px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 60px;
    color: var(--color-text-light);
}

#seo-content h3 {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 1.5em; text-align: center;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 40px 0;
    color: var(--color-text-light);
    font-size: 0.9em;
}

.coffee-link {
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
    transition: color 0.2s;
}

.coffee-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.divider {
    margin: 0 8px;
    color: #cbd5e1;
}

/* SKRYTÍ PRO PŘÍSTUPNOST */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- REKLAMA --- */
.ad-container {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    padding: 15px;
    border-radius: var(--radius-standard);
    border: 1px dashed rgba(124, 58, 237, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    box-shadow: var(--shadow-soft);
}

/* --- SEO SEKCE --- */
.seo-divider {
    border: 0;
    height: 1px;
    background: #e5e7eb;
    margin: 30px 0;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.seo-grid article {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.03);
}

.seo-grid h4 {
    color: var(--color-primary);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.seo-note {
    margin-top: 30px;
    font-size: 0.9em;
    color: var(--color-text-light);
    text-align: center;
    background: rgba(124, 58, 237, 0.05);
    padding: 15px;
    border-radius: 8px;
}

/* --- COOKIE LIŠTA --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto;
    
    /* Animace příchodu */
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

@media (min-width: 600px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
}

.cookie-content p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--color-text);
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-accept, .btn-decline {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s;
    border: none;
}

.btn-accept {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}

.btn-accept:hover {
    background: #6d28d9;
    transform: translateY(-2px);
}

.btn-decline {
    background: #f3f4f6;
    color: var(--color-text-light);
}

.btn-decline:hover {
    background: #e5e7eb;
}

/* --- MODÁLNÍ OKNO (KÁVA) --- */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--color-text);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: transparent;
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    margin-bottom: 10px;
}

.modal-desc {
    color: var(--color-text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.qr-container {
    background: #f9fafb;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.qr-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    max-height: 250px;
}


/* --- PŘEPÍNAČ JAZYKŮ --- */
.lang-switcher {
    text-align: center;
    margin-bottom: 15px; /* Odsazení od copyrightu */
    font-size: 0.9em;
}
.lang-switcher a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}
.lang-switcher a:hover {
    text-decoration: underline;
}
.lang-switcher strong {
    color: var(--color-text-light); /* Barva aktivního, neklikatelného jazyka */
    font-weight: 600;
}