/* Main Container Styles */
.ayg-shortcode-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 2px solid #f0f0f0;
}

.ayg-shortcode-title {
    color: #dc143c;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 15px;
}

.ayg-shortcode-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #dc143c, #ff1744);
    border-radius: 2px;
}

/* Form Styles */
.ayg-shortcode-form {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dc143c;
}

.ayg-shortcode-form-group {
    margin-bottom: 20px;
}

.ayg-shortcode-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ayg-shortcode-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #ffffff;
    color: #333333;
}

.ayg-shortcode-input:focus {
    outline: none;
    border-color: #dc143c;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
    transform: translateY(-1px);
}

.ayg-shortcode-input:hover {
    border-color: #bbb;
}

.ayg-shortcode-input::placeholder {
    color: #999;
    font-style: italic;
}

/* Button Styles */
.ayg-shortcode-button {
    background: linear-gradient(135deg, #dc143c, #b71c1c);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.ayg-shortcode-button::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;
}

.ayg-shortcode-button:hover {
    background: linear-gradient(135deg, #b71c1c, #8e0000);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.3);
}

.ayg-shortcode-button:hover::before {
    left: 100%;
}

.ayg-shortcode-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(220, 20, 60, 0.3);
}

.ayg-shortcode-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ayg-shortcode-button:disabled::before {
    display: none;
}

/* Secondary Button */
.ayg-shortcode-button-secondary {
    background: linear-gradient(135deg, #333333, #1a1a1a);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin: 0 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ayg-shortcode-button-secondary:hover {
    background: linear-gradient(135deg, #555555, #333333);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

/* Progress Section */
.ayg-shortcode-progress {
    display: none;
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.ayg-shortcode-progress h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
}

.ayg-shortcode-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #dc143c;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.ayg-shortcode-progress p {
    color: #666;
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

/* Progress Bar Animation */
.ayg-progress-text {
    margin-top: 15px;
    color: #333;
    font-weight: 600;
}

.ayg-progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.ayg-progress-steps li {
    flex: 1;
    text-align: center;
    position: relative;
    color: #ccc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ayg-progress-steps li.active {
    color: #dc143c;
    font-weight: bold;
}

.ayg-progress-steps li::before {
    content: '';
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    display: block;
    margin: 0 auto 5px;
    transition: all 0.3s;
}

.ayg-progress-steps li.active::before {
    background: #dc143c;
    transform: scale(1.3);
}

/* Preview Section */
.ayg-shortcode-preview {
    display: none;
    margin: 30px 0;
    text-align: center;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    border: 2px solid #f0f0f0;
}

.ayg-shortcode-preview h3 {
    color: #dc143c;
    margin-bottom: 25px;
    font-size: 22px;
    font-weight: bold;
}

.ayg-shortcode-video {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.ayg-shortcode-video:hover {
    transform: scale(1.02);
}

/* Video Info Display */
.ayg-video-metadata {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.ayg-video-metadata h4 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ayg-metadata-item {
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #dc143c;
}

.ayg-metadata-label {
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ayg-metadata-value {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Actions Section */
.ayg-shortcode-actions {
    margin: 30px 0;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ayg-shortcode-actions h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Success Section */
.ayg-shortcode-success {
    display: none;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    color: #155724;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.ayg-shortcode-success::before {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.ayg-shortcode-success h3 {
    color: #155724;
    margin: 0 0 15px 0;
    font-size: 20px;
}

.ayg-shortcode-success p {
    margin: 0 0 20px 0;
    font-size: 16px;
}

.ayg-shortcode-success .ayg-shortcode-button {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    max-width: 250px;
    margin: 0 auto;
}

.ayg-shortcode-success .ayg-shortcode-button:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
}

/* Error Section */
.ayg-shortcode-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: 2px solid #dc3545;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    position: relative;
    animation: slideIn 0.3s ease;
}

.ayg-shortcode-error::before {
    content: '⚠';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Input Validation States */
.ayg-shortcode-input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease;
}

.ayg-shortcode-input.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.ayg-validation-message {
    font-size: 12px;
    margin-top: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
}

.ayg-validation-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ayg-validation-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Loading States */
.ayg-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}

.ayg-loading-content {
    text-align: center;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ayg-shortcode-container {
        margin: 10px;
        padding: 20px;
    }
    
    .ayg-shortcode-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .ayg-shortcode-form {
        padding: 20px;
    }
    
    .ayg-shortcode-button-secondary {
        width: 100%;
        margin: 5px 0;
        box-sizing: border-box;
    }
    
    .ayg-shortcode-actions {
        text-align: left;
    }
    
    .ayg-video-metadata {
        padding: 15px;
    }
    
    .ayg-progress-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .ayg-progress-steps li {
        text-align: left;
        padding: 5px 0;
    }
    
    .ayg-progress-steps li::before {
        margin: 0 10px 0 0;
        display: inline-block;
        vertical-align: middle;
    }
}

@media (max-width: 480px) {
    .ayg-shortcode-container {
        margin: 5px;
        padding: 15px;
    }
    
    .ayg-shortcode-input {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .ayg-shortcode-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .ayg-shortcode-video {
        border-radius: 8px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .ayg-shortcode-container {
        background: #1a1a1a;
        border-color: #333;
        color: #ffffff;
    }
    
    .ayg-shortcode-form {
        background: #2a2a2a;
    }
    
    .ayg-shortcode-input {
        background: #333;
        border-color: #555;
        color: #ffffff;
    }
    
    .ayg-shortcode-input::placeholder {
        color: #aaa;
    }
    
    .ayg-shortcode-label {
        color: #ffffff;
    }
    
    .ayg-video-metadata {
        background: #2a2a2a;
    }
    
    .ayg-metadata-item {
        background: #333;
    }
    
    .ayg-metadata-label {
        color: #ffffff;
    }
    
    .ayg-metadata-value {
        color: #ccc;
    }
}

/* Print Styles */
@media print {
    .ayg-shortcode-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .ayg-shortcode-button,
    .ayg-shortcode-button-secondary,
    .ayg-shortcode-actions {
        display: none;
    }
    
    .ayg-shortcode-video {
        border: 1px solid #000;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ayg-shortcode-container {
        border-color: #000;
    }
    
    .ayg-shortcode-input {
        border-color: #000;
    }
    
    .ayg-shortcode-button {
        background: #000;
        border: 2px solid #fff;
    }
    
    .ayg-shortcode-title {
        color: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .ayg-shortcode-spinner {
        animation: none;
        border: 4px solid #dc143c;
    }
}