:root {
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --bg: #09090b;
    --card-bg: #18181b;
    --input-bg: #27272a;
    --text: #ffffff;
    --text-muted: #a1a1aa;
    --border: #3f3f46;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 20%);
}

.container {
    width: 100%;
    max-width: 650px;
    padding: 20px;
}

.main-card {
    background: rgba(24, 24, 27, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.tabs {
    display: flex;
    background: var(--input-bg);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 30px;
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.3s;
    font-weight: 600;
    font-size: 14px;
}

.tab.active {
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 50px 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.01);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 30px var(--primary-glow);
}

.icon-large {
    font-size: 50px;
    margin-bottom: 15px;
    display: block;
    filter: grayscale(100%);
    transition: 0.3s;
}

.upload-area:hover .icon-large {
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Paste Area */
.paste-area {
    display: none;
}

textarea {
    width: 100%;
    height: 200px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    resize: vertical;
    outline: none;
    transition: 0.3s;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.settings-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.setting-group {
    flex: 1;
    min-width: 0;
    position: relative;
}

.setting-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
select {
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 14px;
    border-radius: 10px;
    outline: none;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    transition: all 0.25s ease;
}

input[type="text"]:hover,
select:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background-color: #2a2a2e;
}

input[type="text"]:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), 0 0 20px rgba(139, 92, 246, 0.08);
    background-color: #2a2a2e;
}

input[type="text"]::placeholder {
    color: #52525b;
    font-size: 13px;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 36px;
}

.setting-group:has(select)::after {
    content: '';
    position: absolute;
    right: 12px;
    bottom: 13px;
    width: 14px;
    height: 14px;
    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='%23a1a1aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: transform 0.25s ease;
}

.setting-group:focus-within:has(select)::after {
    transform: rotate(180deg);
    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='%238b5cf6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

select option {
    background: #1e1e22;
    color: var(--text);
    padding: 8px;
}

/* Buttons */
.btn-action {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border: none;
    padding: 14px;
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
    box-shadow: 0 10px 15px -3px var(--primary-glow);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px var(--primary-glow);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results */
.result-box {
    margin-top: 25px;
    background: #000;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #333;
    display: none;
    animation: fadeIn 0.3s ease;
}

.link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #222;
}

.link-url {
    color: #4ade80;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}

.copy-btn {
    background: #222;
    border: none;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}

.copy-btn:hover {
    background: #333;
    color: #4ade80;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

.file-preview-list {
    text-align: left;
    margin-top: 15px;
}

.file-tag {
    display: inline-block;
    background: #333;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px;
}

.top-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.action-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
    font-size: 13px;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--text);
    background: rgba(139, 92, 246, 0.1);
}

.action-btn.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* ===== Upload Progress Bar ===== */
.upload-progress-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.3s ease;
}

.upload-progress-overlay.active {
    display: flex;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.upload-progress-card {
    background: rgba(24, 24, 27, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 36px;
    width: 90%;
    max-width: 480px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(139, 92, 246, 0.1);
    animation: progressCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes progressCardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.progress-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.progress-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    animation: uploadIconPulse 2s ease-in-out infinite;
}

@keyframes uploadIconPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.progress-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.progress-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 20px;
    background: linear-gradient(90deg, #8b5cf6, #6366f1, #3b82f6, #8b5cf6);
    background-size: 300% 100%;
    animation: progressGradient 2s linear infinite;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes progressGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes progressShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-bar-fill.complete {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    background-size: 100% 100%;
    animation: none;
}

.progress-bar-fill.complete::after {
    animation: none;
    opacity: 0;
}

.progress-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.progress-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.progress-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.progress-percentage {
    text-align: center;
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -1px;
}

.progress-file-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.progress-file-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.progress-file-icon svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.progress-file-details {
    overflow: hidden;
    flex: 1;
}

.progress-file-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-file-size {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.progress-cancel-btn {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

.progress-cancel-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.progress-cancel-btn.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    cursor: default;
}

@keyframes checkmarkDraw {
    from { stroke-dashoffset: 24; }
    to { stroke-dashoffset: 0; }
}

.success-checkmark {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
}

.success-checkmark circle {
    fill: rgba(34, 197, 94, 0.15);
    stroke: #22c55e;
    stroke-width: 2;
}

.success-checkmark polyline {
    stroke: #22c55e;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: checkmarkDraw 0.4s ease 0.2s forwards;
}

/* Genel Hata Modal */
.error-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.3s ease;
}

.error-modal-overlay.active {
    display: flex;
}

.error-modal-card {
    background: rgba(24, 24, 27, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 24px;
    padding: 36px;
    width: 90%;
    max-width: 440px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(239, 68, 68, 0.08);
    animation: progressCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.error-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: errorShake 0.5s ease 0.3s;
}

.error-modal-icon svg {
    width: 32px;
    height: 32px;
    color: #ef4444;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.error-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.error-modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.error-modal-desc strong {
    color: #ef4444;
    font-weight: 700;
}

.error-modal-details {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.error-modal-detail {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px;
}

.error-modal-detail-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.error-modal-detail-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.error-modal-detail-value.over-limit {
    color: #ef4444;
}

.error-modal-close-btn {
    width: 100%;
    padding: 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

.error-modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}