:root {
    --bg-color: #1a1d20;
    --card-color: #212529;
    --text-color: #ffffff;
    --accent-color: #0d6efd;
    --accent-hover: #0b5ed7;
    --border-color: #373b3e;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    text-align: center;
}

/* Header */
.main-header { margin-top: 30px; margin-bottom: 20px; }

/* LOGO DÜZENLEMESİ - KESİN ÇÖZÜM */
.logo { 
    font-size: 2rem; 
    font-weight: bold; 
    display: flex; 
    flex-direction: column; /* İkon ve yazıyı her zaman alt alta al */
    align-items: center; 
    justify-content: center; 
    gap: 5px; 
    color: var(--accent-color); 
}

.logo h1 {
    display: flex;
    flex-direction: column; /* Video ve Downloader kelimelerini alt alta al */
    align-items: center;
    line-height: 1; /* Satır aralığını sıkılaştır */
    color: var(--text-color);
    font-size: inherit; /* Logo font büyüklüğünü miras al */
}

.logo span { 
    color: var(--text-color); 
    font-size: 0.8em; /* Downloader yazısını biraz daha küçült */
}

.subtitle { color: #aaa; margin-top: 15px; font-size: 1rem; }

/* Input Group */
.input-group {
    background: var(--card-color);
    padding: 10px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    position: relative;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 1rem;
    outline: none;
    min-width: 0;
}

#pasteBtn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 15px;
    transition: color 0.3s;
    border-right: 1px solid #333;
    margin-right: 5px;
}
#pasteBtn:hover { color: white; }

#downloadBtn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}
#downloadBtn:hover { background: var(--accent-hover); }

/* UYGULAMA YÜKLEME BUTONU (PWA) */
#installAppContainer {
    display: none;
    margin-bottom: 20px;
}

#installAppBtn {
    background: linear-gradient(45deg, #0d6efd, #0043a8);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
}

#installAppBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.5);
}

#installAppBtn i {
    font-size: 1.2rem;
}

/* Platforms */
.supported-platforms { display: flex; justify-content: center; gap: 20px; margin-top: 25px; margin-bottom: 25px; font-size: 2.2rem; color: #555; flex-wrap: wrap; }
.platform:hover { color: var(--accent-color); transform: translateY(-3px); transition: 0.3s; }

/* Ads */
.ad-container { margin: 20px 0; background: #2b3035; padding: 10px; border-radius: 8px; min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; width: 100%; }
.ad-label { font-size: 0.7rem; color: #555; margin-bottom: 5px; text-transform: uppercase; }

/* Info Section */
.info-section { display: flex; justify-content: space-between; gap: 15px; margin-top: 40px; flex-wrap: wrap; }
.info-card { flex: 1; min-width: 200px; background: var(--card-color); padding: 20px; border-radius: 10px; text-align: center; border: 1px solid var(--border-color); }
.info-card i { font-size: 2rem; color: var(--accent-color); margin-bottom: 10px; }
.info-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.info-card p { font-size: 0.9rem; color: #aaa; line-height: 1.4; }

/* Footer */
footer { margin-top: auto; padding: 30px 20px; color: #555; font-size: 0.8rem; }

/* Modal */
.modal { display: none; position: fixed; z-index: 999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.modal-content { background-color: var(--card-color); margin: 15vh auto; padding: 25px; border: 1px solid var(--border-color); width: 90%; max-width: 450px; border-radius: 15px; position: relative; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

/* ÇARPI İŞARETİ KESİN ÇÖZÜM */
.close-modal, 
span.close-modal { 
    display: none !important; 
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.loader { border: 4px solid #333; border-top: 4px solid var(--accent-color); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.ad-popup-container { margin-top: 20px; background: #fff; min-height: 250px; display: flex; align-items: center; justify-content: center; color: black; border-radius: 4px; overflow: hidden; width: 100%; }
.ad-popup-container img, .ad-popup-container iframe { max-width: 100%; height: auto; }

.hidden { display: none; }

/* --- RESPONSIVE TASARIM (MOBİL UYUMU) --- */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 100%;
    }

    .main-header { 
        margin-top: 15px; 
        margin-bottom: 15px;
    }
    
    .logo { 
        font-size: 1.5rem; /* Mobilde daha da küçült */
    }
    
    .subtitle {
        font-size: 0.85rem;
        padding: 0 10px;
        margin-top: 10px;
    }

    .input-group {
        flex-direction: column;
        padding: 8px;
        border-radius: 20px;
        gap: 10px;
    }

    .input-group input {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 1rem;
        background: rgba(255,255,255,0.05);
        border-radius: 10px;
    }

    #pasteBtn {
        display: none;
    }

    #downloadBtn {
        width: 100%;
        padding: 12px;
        font-size: 1.1rem;
        border-radius: 12px;
    }

    .supported-platforms {
        font-size: 1.8rem;
        gap: 15px;
    }

    .info-section {
        flex-direction: column;
        gap: 15px;
    }

    .info-card {
        min-width: 100%;
        padding: 15px;
    }

    .ad-container, .ad-popup-container {
        max-width: 100%;
        overflow: hidden;
    }
}