/* ==========================================================================
   YTMP3.NEWS - Custom Styles
   ========================================================================== */

/* Root Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #ffffff;
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-1, .display-2, .display-3, .display-4 {
    font-weight: 700;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
}

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

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-rounded {
    border-radius: 50px;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: var(--warning-color) !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,100 1000,0 1000,100"/></svg>') no-repeat center bottom;
    background-size: cover;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.hero-image {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Converter Card */
.converter-card {
    background: white;
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.converter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.converter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.1);
}

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

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
}

.form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    background: var(--light-color);
    border: 2px solid #e9ecef;
    border-right: none;
    color: var(--secondary-color);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Progress Bar */
.progress {
    height: 1rem;
    border-radius: var(--border-radius);
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-primary);
    transition: width 0.6s ease;
}

/* Video Info Preview */
#videoInfo {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

#videoInfo:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#videoInfo img {
    border-radius: calc(var(--border-radius) - 2px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

#videoInfo h6 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

#videoInfo .text-muted {
    color: var(--secondary-color) !important;
    font-size: 0.875rem;
}

#videoInfo .d-flex {
    align-items: flex-start;
}

/* Dark mode support for videoInfo */
@media (prefers-color-scheme: dark) {
    #videoInfo {
        background: linear-gradient(135deg, #343a40 0%, #495057 100%);
        border-color: #6c757d;
        color: #ffffff;
    }
    
    #videoInfo h6 {
        color: #ffffff;
    }
    
    #videoInfo .text-muted {
        color: #adb5bd !important;
    }
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Feature Cards */
.feature-card {
    transition: var(--transition);
    border-radius: 1rem;
    overflow: hidden;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    margin-bottom: 1rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon i {
    transform: scale(1.1);
}

.feature-card .card-body {
    padding: 2rem;
}

.feature-card h5 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: #495057;
    line-height: 1.7;
    font-weight: 400;
    margin-bottom: 0;
}

/* Features Section Background */
#features {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#features h2 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 3rem;
}

/* Feature Icon Colors */
.feature-icon .fa-rocket {
    color: var(--primary-color);
}

.feature-icon .fa-shield-alt {
    color: var(--success-color);
}

.feature-icon .fa-mobile-alt {
    color: var(--info-color);
}

.feature-icon .fa-music {
    color: var(--warning-color);
}

.feature-icon .fa-free-code-camp {
    color: var(--danger-color);
}

.feature-icon .fa-globe {
    color: var(--secondary-color);
}

/* Accordion */
.accordion {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-item {
    border: none;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-button {
    background: white;
    border: none;
    padding: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    border-radius: var(--border-radius);
}

.accordion-button:not(.collapsed) {
    background: var(--light-color);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.accordion-body {
    padding: 1.5rem;
    background: white;
}

/* Sections */
section {
    padding: 4rem 0;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* Footer */
footer {
    background: var(--dark-color) !important;
    color: white;
    padding: 3rem 0 2rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

footer a:hover {
    color: white;
    text-decoration: none;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .converter-card {
        margin: 1rem;
        border-radius: 1rem;
    }
    
    .feature-card .card-body {
        padding: 1.5rem;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section .display-4 {
        font-size: 1.75rem;
    }
    
    .converter-card .card-body {
        padding: 1.5rem;
    }
    
    .feature-card .card-body {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #212529;
        --dark-color: #f8f9fa;
    }
    
    body {
        background-color: #1a1a1a;
        color: #f8f9fa;
    }
    
    .converter-card {
        background: #2d2d2d;
        color: #f8f9fa;
    }
    
    .form-control {
        background: #2d2d2d;
        border-color: #fff;
        color: #f8f9fa;
    }
    
    .form-control:focus {
        background: #2d2d2d;
        border-color: #fff;
    }
    
    .accordion-button {
        background: #2d2d2d;
        color: #f8f9fa;
    }
    
    .accordion-body {
        background: #2d2d2d;
        color: #f8f9fa;
    }
    
    /* Dark mode placeholder styles */
    ::placeholder {
        color: #adb5bd !important;
        opacity: 0.8;
    }
    
    ::-webkit-input-placeholder {
        color: #adb5bd !important;
        opacity: 0.8;
    }
    
    ::-moz-placeholder {
        color: #adb5bd !important;
        opacity: 0.8;
    }
    
    :-ms-input-placeholder {
        color: #adb5bd !important;
        opacity: 0.8;
    }
    
    /* Dark mode about section styles */
    #about {
        background-color: #212529 !important;
    }
    
    #about h2 {
        color: #f8f9fa;
    }
    
    #about p {
        color: #dee2e6;
    }
    
    #about .lead {
        color: #f8f9fa;
    }
    
    #about .text-muted {
        color: #adb5bd !important;
    }
    
    /* Dark mode features section styles */
    #features {
        background: linear-gradient(135deg, #212529 0%, #343a40 100%) !important;
    }
    
    #features h2 {
        color: #f8f9fa;
    }
    
    .feature-card {
        background: #2d2d2d;
        border-color: #495057;
    }
    
    .feature-card:hover {
        border-color: var(--primary-color);
        box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
    }
    
    .feature-card h5 {
        color: #f8f9fa;
    }
    
    .feature-card p {
        color: #dee2e6;
    }
}

/* Print Styles */
@media print {
    .navbar, .hero-section, footer {
        display: none !important;
    }
    
    .converter-card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        break-after: avoid;
    }
}

/* Accessibility Improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.visually-hidden-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .card {
        border: 2px solid var(--secondary-color);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-image {
        animation: none;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Selection Styles */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Placeholder Styles */
::placeholder {
    color: #6c757d !important;
    opacity: 0.8;
}

::-webkit-input-placeholder {
    color: #6c757d !important;
    opacity: 0.8;
}

::-moz-placeholder {
    color: #6c757d !important;
    opacity: 0.8;
}

:-ms-input-placeholder {
    color: #6c757d !important;
    opacity: 0.8;
}

/* About Section Styles */
#about {
    background-color: #f8f9fa;
}

#about h2 {
    color: var(--dark-color);
    font-weight: 700;
}

#about p {
    color: #495057;
    font-weight: 400;
    line-height: 1.7;
}

#about .lead {
    color: var(--dark-color);
    font-weight: 500;
}

#about .text-primary {
    color: var(--primary-color) !important;
    font-weight: 700;
}

#about .text-muted {
    color: #6c757d !important;
    font-weight: 400;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.border-radius-custom {
    border-radius: var(--border-radius);
}

.transition-custom {
    transition: var(--transition);
}

/* Loading States */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Error States */
.error-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Success States */
.success-bounce {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
} 

#convertHelp, #urlHelp, #qualityHelp {
    color: #fff;
}