/* YouTube Thumbnail Downloader - Custom Styles */

/* Global Styles */
:root {
    --youtube-red: #FF0000;
    --youtube-dark: #282828;
    --youtube-light: #F9F9F9;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--youtube-light);
    line-height: 1.6;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--youtube-red) 0%, #cc0000 100%);
    box-shadow: var(--shadow-medium);
}

header h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Card Styles */
.card {
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none !important;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--youtube-red);
    box-shadow: 0 0 0 0.2rem rgba(255, 0, 0, 0.25);
}

.input-group-text {
    border-radius: 8px 0 0 8px;
    border: 2px solid #e9ecef;
    border-right: none;
}

/* Button Styles */
.btn-danger {
    background-color: var(--youtube-red);
    border-color: var(--youtube-red);
    border-radius: 0 8px 8px 0;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid var(--youtube-red);
}

.btn-danger:hover {
    background-color: #cc0000;
    border-color: #cc0000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.btn-danger:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 0, 0, 0.25);
}

/* Thumbnail Card Styles */
.thumbnail-card {
    transition: var(--transition);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-light);
}

.thumbnail-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.thumbnail-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.thumbnail-card:hover .thumbnail-image {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.thumbnail-info {
    padding: 16px;
}

.thumbnail-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--youtube-dark);
    margin-bottom: 8px;
}

.thumbnail-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.thumbnail-resolution {
    font-size: 12px;
    color: #999;
    margin-bottom: 16px;
    font-weight: 500;
}

/* Download Button */
.btn-download {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
    width: 100%;
}

.btn-download:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    color: white;
}

.btn-download:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    color: white;
}

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

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-light);
}

.alert-success {
    background-color: #d1edff;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Loading Styles */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Skeleton Loading */
.placeholder {
    border-radius: 4px;
}

/* Empty State */
#emptyState {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .input-group-lg .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .thumbnail-card {
        margin-bottom: 20px;
    }
    
    header .col-md-4 {
        text-align: center !important;
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 20px !important;
    }
    
    .input-group-lg .btn {
        padding: 12px 20px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus {
    outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print Styles */
@media print {
    header,
    footer,
    .btn,
    #searchForm {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

