:root {
    --bg: #0b1020;
    --bg-soft: #121933;
    --surface: rgba(255, 255, 255, 0.96);
    --surface-2: #f8fafc;
    --surface-3: #eef2f7;
    --text: #0f172a;
    --text-soft: #475569;
    --text-muted: #64748b;
    --line: rgba(148, 163, 184, 0.22);
    --line-strong: rgba(100, 116, 139, 0.3);

    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.12);

    --accent: #0f766e;
    --accent-soft: rgba(15, 118, 110, 0.12);

    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;

    --shadow-sm: 0 6px 20px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 24px 70px rgba(2, 6, 23, 0.22);

    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 24px;

    --transition: 220ms ease;
    --max-width: 1240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 28%),
        linear-gradient(180deg, #0b1020 0%, #11182d 40%, #151f38 100%);
    min-height: 100vh;
    padding: 28px;
    line-height: 1.55;
}

a {
    color: var(--primary);
}

img,
svg,
canvas {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

/* Header */
header {
    position: relative;
    overflow: hidden;
    padding: 34px 34px 30px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.96) 0%, rgba(29, 78, 216, 0.94) 46%, rgba(15, 118, 110, 0.9) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.16), transparent 24%),
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.12), transparent 20%),
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
    pointer-events: none;
}

.logo-area {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
}

.logo {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    white-space: nowrap;
}

header h1 {
    position: relative;
    z-index: 1;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
    max-width: 900px;
    margin-bottom: 14px;
}

.subtitle {
    position: relative;
    z-index: 1;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 14px;
}

.dsgvo-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
}

/* Donation */
.donation-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 34px;
    background:
        linear-gradient(135deg, #0f172a 0%, #111827 55%, #1e293b 100%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.donation-text {
    color: #f8fafc;
    font-size: 0.98rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.donation-text i {
    color: #fb7185;
    animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.donation-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.donate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    box-shadow: var(--shadow-sm);
}

.donate-btn:hover {
    transform: translateY(-2px);
    opacity: 0.98;
}

.paypal {
    background: #ffc439;
    color: #111827;
}

.sumup {
    background: #ffffff;
    color: #0f172a;
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--line);
}

.tab-btn {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-soft);
    padding: 12px 18px;
    min-height: 48px;
    border-radius: 14px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.tab-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,0.8);
    border-color: var(--line);
}

.tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 34px;
    animation: fadeIn 0.28s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card */
.card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
}

.card h2 {
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 14px;
}

.card > p {
    color: var(--text-soft);
    margin-bottom: 22px;
}

/* Form */
.input-group {
    margin-bottom: 18px;
}

input[type="text"],
select {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font-size: 1rem;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

input[type="text"]::placeholder {
    color: #94a3b8;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.48);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.code-type {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 18px;
}

.code-type label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.code-type label:hover {
    border-color: rgba(37, 99, 235, 0.25);
    background: #fff;
}

input[type="radio"] {
    accent-color: var(--primary);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.delete-btn {
    appearance: none;
    border: none;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 0.97rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background var(--transition),
        color var(--transition),
        border-color var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: var(--surface-2);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.delete-btn {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.delete-btn:hover {
    transform: translateY(-2px);
    background: rgba(220, 38, 38, 0.14);
}

/* Result */
.result-box {
    margin-top: 24px;
    padding: 24px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 20px;
    text-align: center;
}

.result-box h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 14px;
}

.result-box.hidden {
    display: none;
}

#codeDisplay {
    margin: 20px 0 14px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

#codeDisplay canvas,
#codeDisplay svg,
#codeDisplay img {
    max-width: 100%;
    height: auto;
}

/* Saved List */
.saved-list {
    margin-top: 20px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
}

.saved-list::-webkit-scrollbar {
    width: 10px;
}

.saved-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

.saved-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin: 12px 0;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.saved-info {
    flex: 1;
    min-width: 220px;
}

.saved-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.saved-content {
    word-break: break-word;
    color: var(--text-soft);
    margin-top: 4px;
}

.saved-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-bottom: 32px;
}

.project-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--shadow-md);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
    overflow: hidden;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

.project-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 118, 110, 0.12));
    margin-bottom: 16px;
}

.project-card h3 {
    color: var(--text);
    font-size: 1.15rem;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.project-card p {
    color: var(--text-soft);
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
}

.project-link:hover {
    text-decoration: underline;
}

/* Info box */
.vargatech-info {
    padding: 28px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 118, 110, 0.08)),
        #f8fafc;
    border: 1px solid var(--line);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.vargatech-info h3 {
    color: var(--text);
    margin-bottom: 14px;
    font-size: 1.35rem;
}

.vargatech-info p {
    color: var(--text-soft);
    margin-bottom: 16px;
    line-height: 1.7;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 8px;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* SEO Blocks */
.seo-content-block {
    margin-top: 28px;
    padding: 26px;
    border-radius: 22px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.seo-content-block h2 {
    color: var(--text);
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.seo-content-block p {
    color: var(--text-soft);
    line-height: 1.75;
    margin-bottom: 12px;
}

.seo-footer-content {
    max-width: var(--max-width);
    margin: 28px auto 0;
    padding: 34px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 34px;
}

.seo-column {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.seo-column h3 {
    color: var(--text);
    margin-bottom: 14px;
    font-size: 1.08rem;
}

.seo-column ul {
    list-style: none;
    padding: 0;
}

.seo-column ul li {
    position: relative;
    padding: 8px 0 8px 26px;
    color: var(--text-soft);
    border-bottom: 1px solid #edf2f7;
}

.seo-column ul li:last-child {
    border-bottom: none;
}

.seo-column ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--accent);
    font-weight: 800;
}

.seo-text-large {
    border-top: 1px solid var(--line);
    padding-top: 28px;
}

.seo-text-large h2 {
    color: var(--text);
    font-size: clamp(1.55rem, 2.5vw, 2.2rem);
    line-height: 1.2;
    margin-bottom: 18px;
    letter-spacing: -0.025em;
}

.seo-text-large p {
    color: var(--text-soft);
    line-height: 1.8;
    margin-bottom: 14px;
}

/* Footer */
footer {
    max-width: var(--max-width);
    margin: 28px auto 0;
    padding: 26px 24px;
    color: rgba(255,255,255,0.88);
    text-align: center;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
}

footer a {
    color: #93c5fd;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Utility spacing for grouped buttons */
.result-box .btn-primary,
.result-box .btn-secondary,
.card .btn-primary,
.card .btn-secondary {
    margin: 6px 8px 0 0;
}

/* Mobile */
@media (max-width: 900px) {
    body {
        padding: 16px;
    }

    .container,
    .seo-footer-content,
    footer {
        border-radius: 22px;
    }

    .tab-content,
    header,
    .donation-bar {
        padding-left: 22px;
        padding-right: 22px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container,
    .seo-footer-content,
    footer {
        margin: 0;
        border-radius: 0;
    }

    header {
        padding: 24px 18px;
    }

    .logo-area {
        flex-direction: column;
        align-items: flex-start;
    }

    header h1 {
        font-size: 1.9rem;
    }

    .subtitle {
        font-size: 0.98rem;
    }

    .donation-bar {
        padding: 16px 18px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .donation-buttons {
        width: 100%;
        justify-content: center;
    }

    .tabs {
        padding: 14px;
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        text-align: left;
    }

    .tab-content {
        padding: 18px;
    }

    .card,
    .seo-content-block,
    .seo-column,
    .vargatech-info {
        padding: 20px;
    }

    .saved-item {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary,
    .delete-btn {
        width: 100%;
    }

    .projects-grid,
    .seo-grid {
        grid-template-columns: 1fr;
    }

    .seo-footer-content {
        padding: 20px 18px;
        margin-top: 0;
    }

    footer {
        padding: 22px 18px 28px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.7rem;
    }

    .badge,
    .dsgvo-badge {
        font-size: 0.78rem;
    }

    .card h2,
    .seo-content-block h2 {
        font-size: 1.3rem;
    }

    .seo-text-large h2 {
        font-size: 1.5rem;
    }
}