/* === ED Checker — Europe Direct Trnava === */
:root {
    /* Brand: #1B3F92 */
    --blue-50: #EEF2FA;
    --blue-100: #D6E0F5;
    --blue-200: #ADBFEA;
    --blue-300: #7A9ADD;
    --blue-400: #4A73CB;
    --blue-500: #2554B0;
    --blue-600: #1B3F92;
    --blue-700: #163478;
    --blue-800: #11295E;
    --blue-900: #0C1D44;

    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;

    --green-50: #F0FDF4;
    --green-500: #22C55E;
    --green-700: #15803D;

    --red-50: #FEF2F2;
    --red-100: #FEE2E2;
    --red-500: #EF4444;
    --red-700: #B91C1C;

    --amber-50: #FFFBEB;
    --amber-100: #FEF3C7;
    --amber-500: #F59E0B;
    --amber-700: #B45309;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* === Base === */
body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Header === */
.header {
    background: var(--blue-600);
    color: white;
    padding: 36px 24px;
    position: relative;
    overflow: hidden;
}


.header-inner {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    flex-shrink: 0;
    opacity: 0.9;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.subtitle {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.6;
}

/* === Main === */
.main {
    flex: 1;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

/* === Features === */
.features {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
}

.feature + .feature {
    border-top: 1px solid var(--gray-100);
}

.feature-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.feature-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1px;
}

.feature-desc {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.4;
}

/* === Input Card === */
.input-card {
    background: white;
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

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

.label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.select {
    width: 100%;
    padding: 10px 36px 10px 12px;
    font-family: var(--font);
    font-size: 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 150ms, box-shadow 150ms;
}

.select:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.textarea {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    color: var(--gray-800);
    resize: vertical;
    min-height: 180px;
    transition: border-color 150ms, box-shadow 150ms;
}

.textarea:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.textarea::placeholder {
    color: var(--gray-400);
}

.char-count {
    font-size: 12px;
    color: var(--gray-400);
    text-align: right;
    margin-top: 4px;
}

/* === Tabs === */
.tab-bar {
    display: flex;
    gap: 0;
    background: var(--gray-100);
    border-radius: 8px;
    padding: 3px;
}

.tab {
    flex: 1;
    padding: 8px 16px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 150ms;
}

.tab.active {
    background: white;
    color: var(--gray-800);
    box-shadow: var(--shadow-sm);
}

.tab:hover:not(.active) {
    color: var(--gray-700);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* === Drop Zone === */
.drop-zone {
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms;
    background: var(--gray-50);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--blue-400);
    background: var(--blue-50);
}

.drop-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.drop-text {
    font-size: 14px;
    color: var(--gray-600);
}

.drop-link {
    color: var(--blue-600);
    font-weight: 500;
    text-decoration: underline;
}

.drop-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

.drop-zone-file {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.file-remove {
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    color: var(--gray-400);
    background: var(--gray-200);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms;
}

.file-remove:hover {
    background: var(--red-100);
    color: var(--red-500);
}

/* (rules panel removed) */

/* === Buttons === */
.btn-primary {
    width: 100%;
    padding: 12px 24px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    color: white;
    background: var(--blue-600);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 150ms;
}

.btn-primary:hover {
    background: var(--blue-700);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    background: var(--blue-800);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* === Results === */
.results {
    margin-top: 28px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    margin-bottom: 28px;
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.summary-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--blue-50);
}

.summary-headline {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.summary-text {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.6;
}

.summary-stats {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-100);
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-count {
    font-weight: 700;
    font-size: 15px;
}

.stat-count.errors { color: var(--red-500); }
.stat-count.warnings { color: var(--amber-500); }

/* === Issues === */
.issues-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
}

.issue-card {
    background: white;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    border-left: 3px solid var(--red-500);
}

.issue-card.warning {
    border-left-color: var(--amber-500);
}

.issue-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.issue-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.2px;
}

.issue-badge.error {
    background: var(--red-50);
    color: var(--red-700);
}

.issue-badge.warning {
    background: var(--amber-50);
    color: var(--amber-700);
}

.issue-rule {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.issue-text {
    font-size: 13px;
    color: var(--red-500);
    margin-bottom: 4px;
    font-style: italic;
}

.issue-card.warning .issue-text {
    color: var(--amber-500);
}

.issue-explanation {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}

/* === Issue Categories === */
.issues-category {
    margin-bottom: 28px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
}

.cat-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cat-pravidla { background: var(--blue-600); }
.cat-gramatika { background: var(--red-500); }
.cat-copywriting { background: var(--amber-500); }
.cat-rewritten { background: var(--green-500); }

.rewritten-section {
    margin-top: 28px;
}

/* === Rewritten === */
.rewritten-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    position: relative;
}

.rewritten-text {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-800);
    padding-right: 80px;
}

.rewritten-text p {
    margin: 0 0 12px 0;
}

.rewritten-text p:last-child {
    margin-bottom: 0;
}

.rewritten-text strong {
    color: var(--gray-900);
    font-weight: 600;
}

.btn-copy {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 12px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-600);
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all 150ms;
}

.btn-copy:hover {
    background: var(--blue-100);
}

.btn-copy.copied {
    background: var(--green-50);
    border-color: var(--green-500);
    color: var(--green-700);
}

/* === Error === */
.error-card {
    background: var(--red-50);
    border: 1px solid var(--red-100);
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 24px;
    color: var(--red-700);
    font-size: 14px;
}

/* === Footer === */
.footer {
    padding: 24px;
    text-align: center;
    color: var(--gray-400);
    font-size: 12px;
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

.footer-brand {
    font-weight: 600;
    margin-top: 2px;
    color: var(--gray-500);
}

/* === Dashboard === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    text-decoration: none;
    color: inherit;
    transition: all 150ms;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--blue-300);
    transform: translateY(-2px);
}

.dashboard-card-icon {
    font-size: 32px;
}

.dashboard-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.dashboard-card-desc {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.5;
}

.dashboard-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.dashboard-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--blue-50);
    color: var(--blue-600);
}

/* === Logo link === */
.logo-link {
    color: inherit;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 150ms;
}

.logo-link:hover {
    opacity: 1;
}

/* === Ideas === */
.ideas-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.idea-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.idea-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.idea-icon {
    font-size: 18px;
}

.idea-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.idea-channel {
    font-size: 12px;
    font-weight: 600;
    color: var(--blue-600);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.idea-format {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 7px;
    border-radius: 4px;
}

.btn-copy-idea {
    margin-left: auto;
    padding: 4px 10px;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    color: var(--blue-600);
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    border-radius: 5px;
    cursor: pointer;
    transition: all 150ms;
}

.btn-copy-idea:hover {
    background: var(--blue-100);
}

.btn-copy-idea.copied {
    background: var(--green-50);
    border-color: var(--green-500);
    color: var(--green-700);
}

.idea-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.idea-description {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 8px;
}

.idea-why {
    font-size: 12px;
    color: var(--gray-400);
    font-style: italic;
}

.btn-secondary {
    width: 100%;
    padding: 12px 24px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    color: var(--blue-600);
    background: white;
    border: 1.5px solid var(--blue-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 150ms;
}

.btn-secondary:hover {
    background: var(--blue-50);
    border-color: var(--blue-400);
}

/* === Random info === */
.random-info {
    text-align: center;
    padding: 24px 16px;
    color: var(--gray-500);
    font-size: 14px;
}

/* === Loading State === */
.loading .input-card {
    opacity: 0.6;
    pointer-events: none;
}

/* === Responsive === */
@media (max-width: 600px) {
    .header { padding: 28px 16px; }
    .main { padding: 20px 16px; }
    .input-card { padding: 20px; }
    .logo { font-size: 26px; }
    .rewritten-text { padding-right: 0; }
    .btn-copy { position: static; margin-top: 12px; width: 100%; text-align: center; }
    .dashboard-grid { grid-template-columns: 1fr; }
}
