/* پێناسەکردنی ڕەنگەکان و فۆنت */
:root {
    --primary: #E60023; /* ڕەنگی فەرمی پینترێست */
    --primary-hover: #b8001c;
    --bg-gradient: radial-gradient(circle at top, #1a1a2e 0%, #0f0f1a 100%);
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #a0a0b8;
    --success: #00b894;
    --font-kurdi: 'Vazirmatn', 'Plus Jakarta Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-kurdi);
    transition: all 0.3s ease;
}

body {
    background: #0f0f1a;
    background-image: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* پاشبنەمای ڕووناکی کەشخە */
.background-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230, 0, 35, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 850px;
    padding: 40px 20px;
    z-index: 1;
}

/* هێدەر */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
}

.logo-icon {
    font-size: 3rem;
    color: var(--primary);
    filter: drop-shadow(0 0 15px rgba(230, 0, 35, 0.5));
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo h1 span {
    color: var(--primary);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* سندوقی سەرەکی داونلۆد */
.download-area {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.input-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.input-wrapper {
    position: relative;
    flex: 1;
    min-width: 280px;
}

.link-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.input-wrapper input {
    width: 100%;
    padding: 18px 50px 18px 50px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--card-border);
    border-radius: 16px;
    color: white;
    font-size: 1rem;
    outline: none;
    text-align: left; /* بۆ ئەوەی بەستەرەکە ڕێک بێت */
    direction: ltr;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(230, 0, 35, 0.2);
}

.clear-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
}

.clear-btn:hover {
    color: white;
}

.btn-main {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 35px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
}

.btn-main:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 0, 35, 0.3);
}

/* لۆدەر (کاتی چاوەڕوانی) */
.loader-wrapper {
    text-align: center;
    padding: 30px 0 10px 0;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

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

/* کارتی ئەنجام */
.result-card {
    display: flex;
    gap: 25px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 20px;
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

.preview-container {
    position: relative;
    width: 140px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

#video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: white;
}

.video-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.video-info h3 {
    font-size: 1.3rem;
}

.video-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.btn-success {
    background: var(--success);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    margin-top: 5px;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
}

/* ئینۆت یاخود پەیامی هەڵە */
.error-box {
    background: rgba(230, 0, 35, 0.1);
    border: 1px solid rgba(230, 0, 35, 0.2);
    color: #ff4d6d;
    padding: 15px;
    border-radius: 12px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hidden {
    display: none !important;
}

/* بەشی فۆڕمات و خزمەتگوزاریەکان */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
}

.feature-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

/* گونجاندن لەگەڵ مۆبایل */
@media (max-width: 600px) {
    .input-group { flex-direction: column; }
    .btn-main { justify-content: center; }
    .result-card { flex-direction: column; align-items: center; text-align: center; }
    .btn-success { align-self: center; }
}
