/* YouTube Downloader WordPress Plugin Styles */

:root {
    --ytd-primary-color: #ff0000;
    --ytd-primary-dark: #cc0000;
    --ytd-secondary-color: #282828;
    --ytd-success-color: #28a745;
    --ytd-warning-color: #ffc107;
    --ytd-danger-color: #dc3545;
    --ytd-info-color: #17a2b8;
    --ytd-light-color: #f8f9fa;
    --ytd-dark-color: #343a40;
    --ytd-border-radius: 8px;
    --ytd-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --ytd-transition: all 0.3s ease;
}

/* Container */
.ytd-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Header */
.ytd-header {
    text-align: center;
    margin-bottom: 30px;
}

.ytd-title {
    color: var(--ytd-primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.ytd-title i {
    margin-right: 10px;
}

.ytd-subtitle {
    color: var(--ytd-dark-color);
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.8;
}

/* Messages */
.ytd-messages {
    margin-bottom: 20px;
}

.ytd-alert {
    padding: 12px 16px;
    border-radius: var(--ytd-border-radius);
    margin-bottom: 15px;
    border: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    box-shadow: var(--ytd-box-shadow);
}

.ytd-alert i {
    margin-right: 8px;
}

.ytd-alert-error {
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.ytd-alert-success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    color: #155724;
}

.ytd-alert-info {
    background: linear-gradient(45deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Form */
.ytd-form-container {
    background: white;
    border-radius: var(--ytd-border-radius);
    padding: 30px;
    box-shadow: var(--ytd-box-shadow);
    margin-bottom: 30px;
}

.ytd-form-group {
    margin-bottom: 25px;
}

.ytd-label {
    display: block;
    font-weight: 600;
    color: var(--ytd-dark-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

.ytd-label i {
    color: var(--ytd-primary-color);
    margin-right: 8px;
}

.ytd-input-group {
    position: relative;
    display: flex;
}

.ytd-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ytd-dark-color);
    opacity: 0.6;
    z-index: 2;
}

.ytd-input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: var(--ytd-border-radius);
    font-size: 1rem;
    transition: var(--ytd-transition);
    outline: none;
}

.ytd-input:focus {
    border-color: var(--ytd-primary-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.ytd-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: var(--ytd-border-radius);
    font-size: 1rem;
    background: white;
    transition: var(--ytd-transition);
    outline: none;
}

.ytd-select:focus {
    border-color: var(--ytd-primary-color);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.ytd-help-text {
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--ytd-dark-color);
    opacity: 0.7;
}

.ytd-help-text i {
    color: var(--ytd-info-color);
    margin-right: 4px;
}

/* Format Options */
.ytd-format-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.ytd-format-option {
    cursor: pointer;
}

.ytd-format-option input[type="radio"] {
    display: none;
}

.ytd-format-card {
    border: 2px solid #e9ecef;
    border-radius: var(--ytd-border-radius);
    padding: 20px;
    text-align: center;
    transition: var(--ytd-transition);
    background: white;
}

.ytd-format-card i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.ytd-format-card strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.ytd-format-card small {
    color: var(--ytd-dark-color);
    opacity: 0.7;
}

.ytd-format-option input[type="radio"]:checked + .ytd-format-card {
    border-color: var(--ytd-primary-color);
    background: rgba(255, 0, 0, 0.05);
    transform: scale(1.02);
}

.ytd-format-option:first-child .ytd-format-card {
    border-color: var(--ytd-success-color);
}

.ytd-format-option:first-child input[type="radio"]:checked + .ytd-format-card {
    border-color: var(--ytd-success-color);
    background: rgba(40, 167, 69, 0.05);
}

.ytd-format-option:first-child .ytd-format-card i {
    color: var(--ytd-success-color);
}

.ytd-format-option:last-child .ytd-format-card {
    border-color: var(--ytd-info-color);
}

.ytd-format-option:last-child input[type="radio"]:checked + .ytd-format-card {
    border-color: var(--ytd-info-color);
    background: rgba(23, 162, 184, 0.05);
}

.ytd-format-option:last-child .ytd-format-card i {
    color: var(--ytd-info-color);
}

/* Buttons */
.ytd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--ytd-border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--ytd-transition);
    outline: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.ytd-btn i {
    margin-right: 8px;
}

.ytd-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ytd-btn-primary {
    background: linear-gradient(45deg, var(--ytd-primary-color), var(--ytd-primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.ytd-btn-primary:hover:not(:disabled) {
    background: linear-gradient(45deg, var(--ytd-primary-dark), #990000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.ytd-btn-success {
    background: linear-gradient(45deg, var(--ytd-success-color), #218838);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.ytd-btn-success:hover:not(:disabled) {
    background: linear-gradient(45deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.ytd-btn-secondary {
    background: var(--ytd-dark-color);
    color: white;
}

/* Progress Section */
.ytd-progress-section {
    background: white;
    border-radius: var(--ytd-border-radius);
    padding: 30px;
    box-shadow: var(--ytd-box-shadow);
    margin-bottom: 30px;
}

.ytd-video-info {
    padding: 20px;
    background: var(--ytd-light-color);
    border-radius: var(--ytd-border-radius);
    margin-bottom: 20px;
}

.ytd-progress-title {
    color: var(--ytd-dark-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.ytd-progress-title i {
    color: var(--ytd-success-color);
    margin-right: 10px;
}

.ytd-progress-bar-container {
    margin-bottom: 20px;
}

.ytd-progress-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ytd-progress-text {
    font-weight: 600;
    color: var(--ytd-dark-color);
}

.ytd-badge {
    background: var(--ytd-info-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.ytd-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.ytd-progress-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--ytd-success-color), #20c997);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.ytd-progress-details {
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--ytd-dark-color);
    opacity: 0.7;
}

.ytd-download-button-container {
    margin-top: 20px;
}

/* Spinner */
.ytd-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: ytd-spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Instructions */
.ytd-instructions {
    background: var(--ytd-light-color);
    border-radius: var(--ytd-border-radius);
    padding: 30px;
    margin-bottom: 30px;
}

.ytd-instructions-title {
    text-align: center;
    color: var(--ytd-dark-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.ytd-instructions-title i {
    color: var(--ytd-info-color);
    margin-right: 10px;
}

.ytd-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.ytd-step {
    text-align: center;
}

.ytd-step-number {
    width: 40px;
    height: 40px;
    background: var(--ytd-primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 15px;
    font-size: 1.2rem;
}

.ytd-step h4 {
    color: var(--ytd-dark-color);
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.ytd-step p {
    color: var(--ytd-dark-color);
    opacity: 0.8;
    margin: 0;
    font-size: 0.875rem;
}

/* Features */
.ytd-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ytd-feature {
    text-align: center;
    padding: 25px 15px;
    background: white;
    border-radius: var(--ytd-border-radius);
    box-shadow: var(--ytd-box-shadow);
    transition: var(--ytd-transition);
}

.ytd-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ytd-feature i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.ytd-feature:nth-child(1) i {
    color: var(--ytd-warning-color);
}

.ytd-feature:nth-child(2) i {
    color: var(--ytd-success-color);
}

.ytd-feature:nth-child(3) i {
    color: var(--ytd-info-color);
}

.ytd-feature h4 {
    color: var(--ytd-dark-color);
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.ytd-feature p {
    color: var(--ytd-dark-color);
    opacity: 0.8;
    margin: 0;
    font-size: 0.9rem;
}

/* Footer Note */
.ytd-footer-note {
    text-align: center;
    padding: 20px;
    background: var(--ytd-secondary-color);
    color: white;
    border-radius: var(--ytd-border-radius);
}

.ytd-footer-note i {
    color: var(--ytd-primary-color);
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ytd-container {
        padding: 15px;
    }
    
    .ytd-title {
        font-size: 2rem;
    }
    
    .ytd-format-options {
        grid-template-columns: 1fr;
    }
    
    .ytd-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ytd-features {
        grid-template-columns: 1fr;
    }
    
    .ytd-form-container,
    .ytd-progress-section,
    .ytd-instructions {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .ytd-steps {
        grid-template-columns: 1fr;
    }
    
    .ytd-progress-status {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Accessibility */
.ytd-btn:focus,
.ytd-input:focus,
.ytd-select:focus {
    outline: 2px solid var(--ytd-primary-color);
    outline-offset: 2px;
}

.ytd-format-option:focus-within .ytd-format-card {
    outline: 2px solid var(--ytd-primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .ytd-container {
        box-shadow: none;
    }
    
    .ytd-btn,
    .ytd-progress-section {
        display: none;
    }
}