/* YouTube Downloader Web - Styles */
/* تم تطويره بواسطة: Eslam Atef */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(45, 45, 45, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease-in;
}

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

.header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid #404040;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #ffd700);
    border-radius: 2px;
}

.title {
    font-size: 28px;
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 16px;
    color: #cccccc;
    margin-bottom: 18px;
    opacity: 0.9;
}

.developer {
    font-size: 16px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 30px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.form-input {
    width: 100%;
    padding: 15px;
    background: rgba(45, 45, 45, 0.8);
    border: 2px solid #404040;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.form-input:focus {
    outline: none;
    border-color: #0078d4;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.2);
    background: rgba(45, 45, 45, 0.9);
}

.form-input::placeholder {
    color: #888;
}

.input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.input-group .form-input {
    flex: 1;
}

.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
}

/* زر إعادة الفحص */
#retry-check-btn {
    animation: fadeInUp 0.5s ease-in-out;
    margin: 10px 0;
}

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

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
    border-radius: 15px;
    min-width: 250px;
}

.btn:disabled {
    background: #6c757d !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled::before {
    display: none;
}

.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.progress-container {
    margin: 25px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: rgba(64, 64, 64, 0.8);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997, #17a2b8);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 25%, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 50%, 
        transparent 75%, 
        rgba(255, 255, 255, 0.1) 75%);
    background-size: 20px 20px;
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

.progress-text {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #17a2b8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.status {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0;
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status.loading {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

.status.success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
}

.status.error {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

.tip {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 10px;
    border-left: 4px solid #17a2b8;
    backdrop-filter: blur(5px);
}

.result-container {
    display: none;
    background: rgba(40, 167, 69, 0.15);
    border: 2px solid #28a745;
    border-radius: 15px;
    padding: 25px;
    margin-top: 25px;
    backdrop-filter: blur(5px);
}

.result-info {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

.result-info strong {
    color: #28a745;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.download-btn-container {
    text-align: center;
}

.hidden {
    display: none;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .container {
        padding: 25px;
        margin: 10px;
    }
    
    .time-inputs {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-large {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .form-input, .btn {
        font-size: 14px;
    }
}

/* تحسين شكل شريط التمرير */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(45, 45, 45, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}