/* Main Styles for Animate Hue Application */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 20px auto 20px auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90vw;
}

main {
    padding-top:30px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

/* Full-width tool header */
.tool-header {
    width: 100%;
    background-color: white;
    text-align: center;
    padding: 40px 20px;
    margin: 59px 0 0 0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Section Styles */
section {
    margin-bottom: 30px;
}

h2, h3 {
    color: #34495e;
    margin-bottom: 15px;
}

/* Upload Section */
.upload-section {
    text-align: center;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.upload-area {
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* Drop zone cursor */
.drop-zone {
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone:hover {
    opacity: 0.8;
}

.upload-icon {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 10px;
}

#fileInput {
    display: none;
}

.file-info {
    margin-top: 15px;
    padding: 10px;
    background-color: #e7f3ff;
    border-radius: 5px;
    color: #0066cc;
}

/* Image Preview */
.image-preview {
    margin-top: 20px;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-info {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    color: #6c757d;
}

.image-info span {
    display: inline-block;
}

/* Controls Section */
.controls-section {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.control-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

/* Tabs */
.tabs-container {
    margin: 20px 0;
}

.tab-nav {
    display: flex;
    background-color: #f0f2f5;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    border-radius: 6px;
    position: relative;
}

.tab-btn:hover {
    color: #495057;
    background-color: rgba(0, 0, 0, 0.03);
}

.tab-btn.active {
    color: #0066cc;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: #0066cc;
    border-radius: 2px;
}

.tab-content {
    padding: 20px 0;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Hue Selector */
.hue-selector-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

#hueSelector {
    cursor: pointer;
}

.hue-values {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 300px;
    margin-top: 10px;
}

.hue-values span {
    font-size: 14px;
    color: #6c757d;
}

/* Gradient Preview */
.gradient-preview {
    height: 40px;
    border-radius: 5px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Range Sliders */
.range-slider-container {
    margin: 20px 0;
}

.slider {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0066cc;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0066cc;
    cursor: pointer;
}

.range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.range-values span {
    font-size: 14px;
    color: #6c757d;
}

/* Animation Controls */
.animation-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.control-group input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

.control-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
}

/* Loop Control */
.loop-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.loop-control input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.loop-control label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Buttons */
.generate-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background-color: #0066cc;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.generate-btn:hover {
    background-color: #0052a3;
}

.generate-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.secondary-btn {
    padding: 10px 20px;
    font-size: 16px;
    color: #0066cc;
    background-color: white;
    border: 2px solid #0066cc;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background-color: #0066cc;
    color: white;
}

/* Progress Section */
.progress-section {
    text-align: center;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background-color: #0066cc;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 15px;
}

#progressText {
    color: #6c757d;
    font-size: 14px;
}

/* Results Section */
.results-section {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.preview-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#resultPreview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.download-btn {
    padding: 10px 20px;
    font-size: 16px;
    color: white;
    background-color: #28a745;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background-color: #218838;
}

.control-buttons {
    display: flex;
    gap: 15px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 14px;
}

/* Utility Classes */
.help-text {
    color: #6c757d;
    font-size: 14px;
    margin-top: 10px;
}

.error {
    color: #dc3545;
    padding: 10px;
    background-color: #f8d7da;
    border-radius: 5px;
    margin: 10px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .animation-controls {
        grid-template-columns: 1fr;
    }
    
    .tab-nav {
        flex-direction: column;
        padding: 6px;
        gap: 4px;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
        padding: 10px 16px;
    }
    
    .tab-btn.active::after {
        bottom: auto;
        left: auto;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 24px;
    }
}

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

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #0066cc;
    animation: spin 1s ease-in-out infinite;
}

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

/* Presets Section */
.presets-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

.presets-section h4 {
    color: #34495e;
    margin-bottom: 10px;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.presets-help {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.preset-item {
    padding: 12px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-item:hover {
    background-color: #e8f4ff;
    border-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
}

.preset-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 4px;
}

.preset-item small {
    display: block;
    color: #666;
    font-size: 0.85em;
    line-height: 1.4;
}

.clickable-preset {
    position: relative;
}

.clickable-preset:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 102, 204, 0.2);
}

/* Toggle icons for sections */
.section-toggle {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.8em;
}

.toggle-icon.collapsed {
    transform: rotate(-90deg);
}

/* Collapsible content animation */
.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Reset button styles */
.reset-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Visual Effects and Animation Settings Sections */
.visual-effects-section,
.animation-settings-section {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;    
    border: 1px solid #f0dada;
}

.visual-effects-section h3,
.animation-settings-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.animation-settings-section h3::before {
    content: "⚙️";
    margin-right: 8px;
}

/* Adjust tabs container for new section */
.visual-effects-section .tabs-container {
    margin-top: 0;
}

/* Preset toggle button */
.preset-toggle {
    background: none;
    border: 1px solid #ddd;
    padding: 2px 8px;
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
    color: #666;
}

.preset-toggle:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

/* Disable hue checkbox */
.disable-hue-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-label span {
    color: #495057;
    font-size: 0.95em;
}

/* Hidden presets */
.presets-grid.hidden {
    display: none;
}

.presets-help.hidden {
    display: none;
}

/* Animation Duration Display */
.animation-duration,
.resolution-info {
    text-align: center;
    padding: 12px;
    background-color: #e7f3ff;
    border-radius: 6px;
    border: 1px solid #0066cc;
    margin-bottom: 10px;
}

.animation-duration strong {
    color: #0066cc;
    font-size: 1.1em;
}

/* Resolution Controls */
.resolution-controls {
    margin-top: 10px;
}

.resolution-info {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
}

#currentResolution {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

.scale-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.8em;
    color: #6c757d;
    width: 100%;
}

.scale-markers span:first-child {
    text-align: left;
}

.scale-markers span:nth-child(2) {
    text-align: center;
}

.scale-markers span:last-child {
    text-align: right;
}

#resolutionNote {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.85em;
}

/* Auto-scale warning styles */
#resolutionNote strong {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .visual-effects-section,
    .animation-settings-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .visual-effects-section h3,
    .animation-settings-section h3 {
        font-size: 1.2em;
    }
}

/* Sponsor Section Styles */
.sponsor-section {
    background-color: #ffffff;
    padding: 0;
    border-radius: 8px;
    margin-top: 25px;
    border: 1px solid #e0e0e0;
}

.sponsor-section h4 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 1.4em;
    text-align: center;
    padding: 20px 30px 0;
}

.sponsor-section > p {
    text-align: center;
    margin-bottom: 25px;
    color: #6c757d;
    font-size: 12px;
    padding: 0 30px;
}

.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0;
}

.sponsor-item {
    background: white;
    padding: 25px;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sponsor-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sponsor-item h5 {
    color: #34495e;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: 600;
}

.sponsor-item h5 i {
    margin-right: 8px;
    color: #0066cc;
}

.sponsor-item p {
    margin-bottom: 15px;
    color: #6c757d;
    font-size: 0.95em;
    line-height: 1.5;
}

.sponsor-link {
    display: inline-block;
    background: #0066cc;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.sponsor-link:hover {
    background: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.3);
}

.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.social-links a {
    background: #f8f9fa;
    color: #6c757d;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.social-links a:hover {
    background: #0066cc;
    color: white;
    transform: translateY(-1px);
}

.social-links a i {
    margin-right: 5px;
}

.social-footer {
    border-top: 1px solid #e0e0e0;
    padding: 20px 30px;
    text-align: center;
    background: #f8f9fa;
}

.social-footer p {
    margin-bottom: 15px;
    font-weight: 600;
    color: #34495e;
}

.social-footer .social-links {
    justify-content: center;
}

/* Full-width banner container */
.sponsor-banner-container {
    width: 100%;
    margin: 20px 0;
    padding: 0;
    display: block;
}

.sponsor-banner-link {
    display: block;
    width: 100%;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 35px;
    margin-top: 35px;
    position: relative;
}

.sponsor-banner-link:hover {
    transform: translateY(-2px);
}

.sponsor-banner-img {
    max-width: 629px;
    height: auto;
    display: block;
    border-radius: 8px;
    margin-left: auto;
    margin-right: auto;
    transition: opacity 0.5s ease, transform 0.3s ease;
}

/* Social section styling */
.footer-section ul li {
    text-align: left !important;
}


/* Social Share Section */
.social-share-section {
    margin: 40px 0 30px 0;
    padding: 30px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.social-share-container {
    max-width: 800px;
    margin: 0 auto;
}

.social-share-section h3 {
    color: #34495e;
    margin-bottom: 15px;
}

.social-share-section p {
    color: #666;
    margin-bottom: 20px;
}

.social-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 60px 0 20px 0;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.twitter-btn {
    color: #1da1f2;
    border-color: #1da1f2;
}

.facebook-btn {
    color: #4267B2;
    border-color: #4267B2;
}

.bluesky-btn {
    color: #0085ff;
    border-color: #0085ff;
}

.copy-btn {
    color: #666;
    border-color: #ddd;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.twitter-btn:hover { 
    background: #1da1f2; 
    color: white;
}
.facebook-btn:hover { 
    background: #4267B2; 
    color: white;
}
.bluesky-btn:hover { 
    background: #0085ff; 
    color: white;
}
.copy-btn:hover { 
    background: #666; 
    color: white;
}

#createNewBtn {
    margin-top: 39px;
    margin-bottom: 24px;
}


/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .social-share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .sponsor-section {
        padding: 15px;
        margin-top: 20px;
    }
    
    .sponsor-banner-container {
        margin: 15px 0;
    }
    
    .sponsor-social {
        padding: 15px;
        margin-top: 15px;
    }
    
    .social-links {
        justify-content: center;
        gap: 8px;
    }
    
    .social-links a {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    .social-footer-section {
        padding: 15px;
        margin-top: 15px;
    }
    
    .social-footer-container {
        padding: 25px;
    }
    
    .social-footer-section h4 {
        font-size: 1.2em;
    }
    
    .social-footer-section p {
        font-size: 1em;
    }
    
    .social-footer-section .social-links {
        gap: 10px;
    }
    
    .social-footer-section .social-links a {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    /* Mobile tooltip adjustments */
    .tooltip::before {
        font-size: 12px;
        padding: 6px 10px;
        max-width: 250px;
    }
    
    .tooltip::after {
        border-width: 5px;
    }
}