:root {
    --bg-color: #f5f5f7;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --accent: #007aff;
    --accent-hover: #0062cc;
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

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

/* Yumuşak Arka Plan Objeleri */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 10s infinite alternate ease-in-out;
}

.bg-shape-1 {
    width: 300px;
    height: 300px;
    background: #e0f2fe;
    top: -50px;
    left: -50px;
}

.bg-shape-2 {
    width: 400px;
    height: 400px;
    background: #fce7f3;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.bg-shape-3 {
    width: 250px;
    height: 250px;
    background: #e0e7ff;
    bottom: 20%;
    left: 20%;
    animation-delay: -2s;
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(30px) scale(1.05); }
}

.container {
    width: 100%;
    max-width: 680px;
    padding: 1.5rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.header {
    text-align: center;
    animation: fadeInDown 0.6s ease-out;
}

.logo-wrapper {
    background: white;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.logo {
    width: 32px;
    height: 32px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Arama Kutusu - Glassmorphism */
.search-box {
    display: flex;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: 99px;
    padding: 0.5rem;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.search-box:focus-within {
    box-shadow: 0 12px 40px rgba(0, 122, 255, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

input[type="url"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 1.5rem;
    font-size: 1.05rem;
    color: var(--text-main);
    outline: none;
    width: 100%;
}

input[type="url"]::placeholder {
    color: #a1a1a6;
}

button {
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 99px;
    padding: 0.9rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 120px;
}

button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

button:active {
    transform: scale(0.96);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Sonuç Alanı */
.result-area {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hidden {
    display: none !important;
}

/* Video Kartı İçeriği */
.video-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.video-info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.thumbnail-placeholder {
    width: 140px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.video-details {
    flex: 1;
}

.video-details h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-details p {
    color: var(--accent);
    font-size: 0.9rem;
    margin: 0;
    text-align: left;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.download-btn {
    text-decoration: none;
    padding: 1.1rem;
    border-radius: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: block;
}

.download-btn.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.download-btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Loader */
.loader {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Animasyonlar */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* MOBİL UYUM (Responsive Design) */
@media (max-width: 580px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 1rem;
    }

    /* Mobilde Arama Kutusunu alt alta alıyoruz */
    .search-box {
        flex-direction: column;
        border-radius: 20px;
        padding: 0.8rem;
        gap: 0.8rem;
    }

    input[type="url"] {
        padding: 0.5rem;
        text-align: center;
    }

    button {
        width: 100%;
        border-radius: 12px;
        padding: 1rem;
    }

    /* Mobilde Video Kartını Dikey Hale Getiriyoruz */
    .video-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .thumbnail-placeholder {
        width: 100%;
        height: auto;
        max-height: 200px;
        aspect-ratio: 16/9;
    }

    .video-details p {
        text-align: center;
    }
}

/* Pasif/Gri Buton Durumu */
button.btn-grey {
    background-color: #e5e5ea !important;
    color: #8e8e93 !important;
    cursor: default;
    box-shadow: none;
}

button.btn-grey:hover {
    transform: none;
    background-color: #e5e5ea !important;
}