:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface2: #1a1a26;
    --border: rgba(255, 255, 255, 0.07);
    --accent: #ff6b35;
    --accent2: #ff9f1c;
    --text: #f0ede8;
    --muted: #6b6880;
    --glow: rgba(255, 107, 53, 0.15);
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 107, 53, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 53, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.wrapper {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 60px 24px 100px;
}

header {
    margin-bottom: 48px;
    animation: fadeDown 0.6s ease both;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.25);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 span {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    margin-top: 16px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    margin-bottom: 20px;
    animation: fadeUp 0.6s ease 0.1s both;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.4), transparent);
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

input[type="text"] {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px var(--glow);
}

input[type="text"]::placeholder {
    color: var(--muted);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.option-group label {
    margin-bottom: 8px;
}

select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6880' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

select:focus {
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 0 0 3px var(--glow);
}

select option {
    background: var(--surface2);
    color: var(--text);
}

.examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.example-tag {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}

.example-tag:hover {
    border-color: rgba(255, 107, 53, 0.3);
    color: var(--accent);
}

button[type="submit"] {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px 28px;
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.1s;
    width: 100%;
}

button[type="submit"]:hover {
    opacity: 0.9;
}

button[type="submit"]:active {
    transform: scale(0.97);
}

button[type="submit"].loading {
    pointer-events: none;
    opacity: 0.7;
}

.result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    animation: fadeUp 0.5s ease both;
    margin-bottom: 20px;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.result-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
}

.result-header-left svg {
    width: 18px;
    height: 18px;
}

.copy-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.copy-btn:hover {
    border-color: rgba(255, 107, 53, 0.3);
    color: var(--accent);
}

.result-body {
    padding: 28px;
}

.result-text {
    white-space: pre-wrap;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    font-weight: 300;
    font-family: 'DM Sans', sans-serif;
}

.error-card {
    background: rgba(255, 59, 48, 0.06);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    animation: fadeUp 0.5s ease both;
    margin-bottom: 20px;
}

.error-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.error-text strong {
    display: block;
    margin-bottom: 4px;
    font-family: 'Syne', sans-serif;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

button.loading .btn-text {
    display: none;
}

button.loading .spinner {
    display: inline-block;
}

.gecmis-item {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.gecmis-item:hover {
    border-color: rgba(255, 107, 53, 0.3);
    background: var(--surface2);
}

.gecmis-urun {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.gecmis-meta {
    font-size: 12px;
    color: var(--muted);
}

.gecmis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.temizle-btn {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}

.temizle-btn:hover {
    color: var(--accent);
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.char-counter {
    font-size: 12px;
    color: var(--muted);
    text-align: right;
    margin-top: 6px;
    transition: color 0.2s;
}

.char-counter.warn {
    color: var(--accent2);
}

.char-counter.over {
    color: #ff4444;
    font-weight: 600;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.download-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}

.download-btn:hover {
    border-color: rgba(255, 107, 53, 0.3);
    color: var(--accent);
}

.gorsel-alan {
    margin-bottom: 20px;
}

.gorsel-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    border: 1px dashed rgba(255, 107, 53, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
}

.gorsel-label:hover {
    border-color: rgba(255, 107, 53, 0.6);
    background: rgba(255, 107, 53, 0.04);
}

.gorsel-ikon {
    font-size: 28px;
}

.gorsel-yazi {
    font-size: 14px;
    font-weight: 500;
}

.gorsel-alt {
    font-size: 12px;
    color: var(--muted);
    font-weight: 300;
}


@media (max-width: 600px) {
    .options-grid {
        grid-template-columns: 1fr 1fr;
    }

    .card {
        padding: 24px;
    }

    .wrapper {
        padding: 40px 16px 80px;
    }
}