/**
 * Favicon Generator Frontend Styles
 */

/* Container */
.favicon-generator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Title and Description */
.favicon-generator-title {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.favicon-generator-description {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Form Container */
.favicon-generator-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e1e8ed;
}

/* Upload Section */
.favicon-upload-section {
    padding: 2rem;
}

.favicon-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: #f8fafc;
}

.favicon-upload-area:hover {
    border-color: #667eea;
    background: #f1f5f9;
    transform: translateY(-2px);
}

.favicon-upload-area.dragover {
    border-color: #667eea;
    background: #e6f3ff;
    transform: scale(1.02);
}

.favicon-upload-content {
    pointer-events: none;
}

.favicon-upload-icon {
    margin-bottom: 1rem;
    color: #667eea;
}

.favicon-upload-area h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.favicon-upload-area p {
    margin: 0 0 1rem 0;
    color: #718096;
}

.favicon-upload-requirements {
    font-size: 0.875rem;
    color: #a0aec0;
}

.favicon-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Preview Section */
.favicon-preview-section {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 1rem;
}

.favicon-preview-image {
    flex-shrink: 0;
}

.favicon-preview-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #fff;
}

.favicon-preview-info {
    flex: 1;
}

.favicon-preview-info h4 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

.favicon-image-details {
    margin-bottom: 1.5rem;
}

.favicon-detail {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: #718096;
}

.favicon-preview-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Progress Section */
.favicon-progress-section {
    padding: 2rem;
    text-align: center;
    background: #f8fafc;
}

.favicon-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.favicon-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.favicon-progress-text {
    font-weight: 500;
    color: #4a5568;
}

/* Results Section */
.favicon-results-section {
    padding: 2rem;
}

.favicon-results-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* Generated Files Grid */
.favicon-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.favicon-file-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.favicon-file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.favicon-file-preview {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem auto;
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.favicon-file-preview img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 2px;
}

.favicon-file-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.favicon-file-size {
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 0.75rem;
}

.favicon-file-download {
    width: 100%;
}

/* HTML Code Section */
.favicon-html-code {
    margin-bottom: 2rem;
}

.favicon-code-container {
    position: relative;
    background: #1a202c;
    border-radius: 8px;
    overflow: hidden;
}

.favicon-code {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1.5rem;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.favicon-copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #4a5568;
    color: #e2e8f0;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favicon-copy-btn:hover {
    background: #667eea;
    transform: scale(1.05);
}

.favicon-copy-btn.copied {
    background: #48bb78;
}

/* Buttons */
.favicon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.favicon-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.favicon-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.favicon-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.favicon-btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.favicon-btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.favicon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Download All and Start Over */
.favicon-download-all,
.favicon-start-over {
    text-align: center;
    margin-bottom: 1rem;
}

/* Error Section */
.favicon-error-section {
    padding: 2rem;
    text-align: center;
    background: #fed7d7;
    border-left: 4px solid #f56565;
}

.favicon-error-message {
    color: #c53030;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .favicon-generator-container {
        padding: 1rem;
    }
    
    .favicon-generator-title {
        font-size: 2rem;
    }
    
    .favicon-preview-section {
        flex-direction: column;
        text-align: center;
    }
    
    .favicon-preview-actions {
        justify-content: center;
    }
    
    .favicon-files-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .favicon-code {
        font-size: 0.75rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .favicon-upload-area {
        padding: 2rem 1rem;
    }
    
    .favicon-files-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .favicon-preview-actions {
        flex-direction: column;
    }
    
    .favicon-btn {
        width: 100%;
        justify-content: center;
    }
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Loading States */
.favicon-btn.loading {
    position: relative;
    color: transparent;
}

.favicon-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Theme Variations */
.favicon-generator-container[data-theme="dark"] {
    background: #1a202c;
    color: #e2e8f0;
}

.favicon-generator-container[data-theme="dark"] .favicon-generator-form {
    background: #2d3748;
    border-color: #4a5568;
}

.favicon-generator-container[data-theme="dark"] .favicon-upload-area {
    background: #374151;
    border-color: #6b7280;
}

.favicon-generator-container[data-theme="dark"] .favicon-upload-area:hover {
    background: #4b5563;
}

/* Accessibility */
.favicon-btn:focus,
.favicon-file-input:focus + .favicon-upload-area {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

