/* Tool Page Styles */

/* Tool Header */
.tool-header {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 80%;
    animation-delay: 4s;
}

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

.tool-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.tool-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tool-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.tool-subtitle {
    font-size: 1.2rem;
    color: #efefef;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.tool-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Tool Interface */
.tool-interface {
    padding: 60px 0;
    background: #f8fafc;
}

.tool-main {
    max-width: 900px;
    margin: 0 auto;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section-header h2 i {
    color: #3b82f6;
}

.section-header p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
}

.upload-area {
    border: 3px dashed #3b82f6;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: #1e40af;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.2);
}

.upload-area.dragover {
    border-color: #1e40af;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 1rem;
}

.upload-content i {
    font-size: 4rem;
    color: #3b82f6;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.upload-content h3 {
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
}

.upload-content p {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.upload-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.upload-btn::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 ease;
}

.upload-btn:hover::before {
    left: 100%;
}

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.format-support {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.format-item {
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.upload-info small {
    color: #64748b;
    font-size: 0.9rem;
}

/* Input Section */
.input-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
}

.input-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Control Tabs */
.control-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.input-row {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.input-group {
    flex: 1;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.value-display {
    color: #3b82f6;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    flex: 1;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.input-unit {
    position: absolute;
    right: 16px;
    color: #64748b;
    font-weight: 500;
    pointer-events: none;
}

.input-group select,
.input-group input[type="number"]:not(.input-wrapper input) {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.input-group select:focus,
.input-group input[type="number"]:focus,
.input-wrapper input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Aspect Control */
.aspect-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.aspect-lock {
    background: #3b82f6;
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.aspect-lock::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 ease;
}

.aspect-lock:hover::before {
    left: 100%;
}

.aspect-lock:not(.active) {
    background: #94a3b8;
}

.aspect-lock:hover {
    transform: scale(1.05);
}

.aspect-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* Slider Styles */
.slider-wrapper {
    position: relative;
    margin: 0.5rem 0;
}

.input-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    position: relative;
}

.input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.input-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.input-group input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
}

.quality-indicator {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.quality-low {
    color: #ef4444;
}

.quality-high {
    color: #10b981;
}

/* Preset Grid */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.preset-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.preset-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-2px);
}

.preset-btn.active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.preset-btn i {
    font-size: 1.5rem;
    color: #3b82f6;
}

.preset-btn span {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.preset-btn small {
    color: #64748b;
    font-size: 0.8rem;
}

/* Action Button */
.action-row {
    text-align: center;
    margin-top: 1rem;
}

.resize-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    justify-content: center;
}

.btn-shine {
    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 ease;
}

.resize-btn:hover .btn-shine {
    left: 100%;
}

.resize-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
}

/* Result Section */
.result-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
}

.image-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.image-panel {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.panel-header {
    margin-bottom: 1rem;
}

.panel-header h3 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.1rem;
}

.image-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: #64748b;
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.stat-item.compression {
    color: #10b981;
    font-weight: 600;
}

.stat-item i {
    font-size: 0.7rem;
}

.image-container {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.comparison-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
}

.arrow-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.placeholder {
    text-align: center;
    color: #64748b;
    padding: 2rem;
}

.processing-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.processing-animation p {
    margin: 0;
    font-weight: 500;
}

/* Download Section */
.download-section {
    text-align: center;
}

.download-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.download-btn,
.reset-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.download-btn.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.download-btn.primary::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 ease;
}

.download-btn.primary:hover::before {
    left: 100%;
}

.download-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.reset-btn.secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.reset-btn.secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.download-info {
    margin-top: 1rem;
}

.download-info small {
    color: #64748b;
    font-size: 0.9rem;
}

/* Processing Area */
.processing-area {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.processing-area h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.image-list {
    margin-bottom: 2rem;
}

.image-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #f8f9ff;
}

.image-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.image-info {
    flex: 1;
}

.image-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #333;
}

.image-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.image-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-processing {
    color: #f59e0b;
}

.status-completed {
    color: #10b981;
}

.status-error {
    color: #ef4444;
}

.image-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.processing-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

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

/* How It Works Section */
.how-it-works {
    padding: 60px 0;
    background: white;
}

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

.step-card {
    text-align: center;
    padding: 2rem 1rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.step-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.step-card p {
    color: #666;
}

/* Tool Features Section */
.tool-features-section {
    padding: 60px 0;
    background: #f8f9ff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feature-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
}

/* Comparison Table */
.comparison-table {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.comparison-table th {
    background: #f8f9ff;
    font-weight: 600;
    color: #333;
}

.comparison-table td {
    color: #666;
}

.size-reduction {
    color: #10b981;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .tool-info h1 {
        font-size: 2.5rem;
    }
    
    .tool-features {
        justify-content: center;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-content i {
        font-size: 3rem;
    }
    
    .resize-options {
        flex-direction: column;
    }
    
    .image-item {
        flex-direction: column;
        text-align: center;
    }
    
    .processing-actions {
        flex-direction: column;
    }
    
    .steps-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 100px 0 40px;
    }
    
    .tool-info h1 {
        font-size: 2rem;
    }
    
    .tool-info p {
        font-size: 1rem;
    }
    
    .upload-area {
        padding: 1.5rem 1rem;
    }
    
    .settings-panel,
    .processing-area {
        padding: 1.5rem;
    }
    
    .how-it-works,
    .tool-features-section {
        padding: 40px 0;
    }
}
/* Image Resizer Specific Styles */
.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.tool-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: white;
}

.tool-description {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    color: white;
}

.tool-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.feature-item {
    /* display: flex; */
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
}

.tool-workspace {
    max-width: 1200px;
    margin: 0 auto;
}

.upload-section {
    margin-bottom: 2rem;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.upload-info {
    margin-top: 1rem;
}

.upload-info small {
    color: #666;
    font-size: 0.9rem;
}

.image-workspace {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 300px 1fr;
    gap: 2rem;
    align-items: start;
}

.image-panel {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 1.5rem;
}

.image-panel h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.image-container {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
}

.placeholder {
    text-align: center;
    color: #999;
    padding: 2rem;
}

.placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.controls-panel {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
}

.controls-panel h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.control-group select,
.control-group input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.control-group select:focus,
.control-group input[type="number"]:focus {
    border-color: #667eea;
    outline: none;
}

.dimension-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dimension-inputs input {
    flex: 1;
}

.dimension-inputs span {
    color: #666;
    font-weight: 500;
}

.aspect-lock {
    background: #667eea;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aspect-lock:not(.active) {
    background: #ccc;
}

.aspect-lock:hover {
    transform: scale(1.1);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.download-section {
    margin-top: 1rem;
    text-align: center;
}

/* Responsive Design for Image Resizer */
@media (max-width: 1024px) {
    .workspace-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .controls-panel {
        order: -1;
    }
}

@media (max-width: 768px) {
    .tool-title {
        font-size: 2.5rem;
    }
    
    .tool-description {
        font-size: 1rem;
    }
    
    .tool-features {
        justify-content: center;
    }
    
    .image-workspace {
        padding: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .dimension-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dimension-inputs span {
        text-align: center;
        padding: 0.5rem 0;
    }
}
/* Tool Description Section */
.tool-description {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.tool-description::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 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.description-content {
    position: relative;
    z-index: 2;
}

.description-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
}

.description-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 2px;
}

.description-content p {
    text-align: center;
    color: #64748b;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 4rem;
    line-height: 1.7;
    font-weight: 400;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-item:hover::before {
    transform: scaleX(1);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.15);
}

.feature-item .icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    position: relative;
    overflow: hidden;
}

.feature-item .icon-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.6s ease;
}

.feature-item:hover .icon-wrapper::before {
    left: 100%;
}

.feature-item i {
    font-size: 2.5rem;
    color: #3b82f6;
    z-index: 2;
    position: relative;
}

.feature-item h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 700;
}

.feature-item p {
    color: #64748b;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    text-align: center;
}

/* Enhanced feature items with specific styling */
.feature-item:nth-child(1) .icon-wrapper {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.feature-item:nth-child(1) i {
    color: #10b981;
}

.feature-item:nth-child(1)::before {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.feature-item:nth-child(2) .icon-wrapper {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.feature-item:nth-child(2) i {
    color: #f59e0b;
}

.feature-item:nth-child(2)::before {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.feature-item:nth-child(3) .icon-wrapper {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

.feature-item:nth-child(3) i {
    color: #ec4899;
}

.feature-item:nth-child(3)::before {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

/* How to Use Section */
.how-to-use {
    padding: 60px 0;
    background: #f8fafc;
}

.how-to-use h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1e293b;
    font-size: 2rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: white;
    padding: 2rem 1rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.step-card h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1.2rem;
}

.step-card p {
    color: #64748b;
    line-height: 1.5;
}

/* Examples Section */
.examples-section {
    padding: 60px 0;
    background: white;
}

.examples-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1e293b;
    font-size: 2rem;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.example-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.example-card:hover {
    border-color: #3b82f6;
    transform: translateY(-3px);
}

.example-card i {
    font-size: 2.5rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.example-card h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1.1rem;
}

.example-card p {
    color: #64748b;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* FAQ Section */
.faq-section {
    padding: 60px 0;
    background: #f8fafc;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1e293b;
    font-size: 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.faq-item h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
}

.faq-item p {
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Related Tools Section */
.related-tools {
    padding: 60px 0;
    background: white;
}

.related-tools h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1e293b;
    font-size: 2rem;
}

.related-tools .tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.related-tools .tool-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.related-tools .tool-card:hover {
    border-color: #3b82f6;
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.related-tools .tool-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.related-tools .tool-content h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1.2rem;
}

.related-tools .tool-content p {
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.related-tools .tool-link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.related-tools .tool-link:hover {
    color: #1e40af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header {
        padding: 60px 0 40px;
    }
    
    .tool-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-info h1 {
        font-size: 2rem;
    }
    
    .tool-subtitle {
        font-size: 1rem;
    }
    
    .tool-badges {
        justify-content: center;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-content i {
        font-size: 3rem;
    }
    
    .input-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .aspect-control {
        flex-direction: row;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .control-tabs {
        flex-direction: column;
    }
    
    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .image-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
    }
    
    .arrow-circle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .download-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .steps-grid,
    .examples-grid,
    .faq-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tool Description Mobile */
    .tool-description {
        padding: 60px 0;
    }
    
    .description-content h2 {
        font-size: 2rem;
    }
    
    .description-content p {
        font-size: 1rem;
        margin-bottom: 3rem;
    }
    
    .features-grid {
        gap: 2rem;
    }
    
    .feature-item {
        padding: 2rem 1.5rem;
    }
    
    .feature-item .icon-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .feature-item i {
        font-size: 2rem;
    }
    
    .feature-item h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 40px 0 30px;
    }
    
    .tool-info h1 {
        font-size: 1.8rem;
    }
    
    .tool-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .upload-area {
        padding: 1.5rem 1rem;
    }
    
    .input-section,
    .result-section,
    .upload-section {
        padding: 1.5rem;
    }
    
    .preset-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-description,
    .how-to-use,
    .examples-section,
    .faq-section,
    .related-tools {
        padding: 40px 0;
    }
    
    .step-card,
    .example-card,
    .faq-item {
        padding: 1.5rem;
    }
    
    .description-content h2 {
        font-size: 1.8rem;
    }
    
    .feature-item {
        padding: 2rem 1rem;
    }
    
    .feature-item .icon-wrapper {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .feature-item i {
        font-size: 1.8rem;
    }
    
    .feature-item h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
}
/* Error Message Styles */
.error-message {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    z-index: 10;
    animation: slideUp 0.3s ease;
}

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

.error-message i {
    font-size: 1rem;
}

/* Loading State */
.upload-area.loading .upload-content {
    opacity: 0.6;
    pointer-events: none;
}

.upload-area.loading .upload-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Enhanced Upload Area Interactions */
.upload-area {
    position: relative;
}

.upload-area:focus-within {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Improved Button Accessibility */
.upload-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.tab-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.preset-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* File Input Accessibility */
#imageInput:focus + .upload-area {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
/* Image Size Calculator Specific Styles */
.calculator-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.image-preview h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-container {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.preview-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
}

.calculation-results {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.result-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.result-card h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-card h3 i {
    color: #3b82f6;
    font-size: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item label {
    font-weight: 500;
    color: #64748b;
    font-size: 0.9rem;
}

.result-item span {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

/* Responsive Design for Calculator */
@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .calculator-section {
        padding: 2rem 1.5rem;
    }
    
    .result-card {
        padding: 1.25rem;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .result-item span {
        font-size: 1rem;
        color: #3b82f6;
    }
}

@media (max-width: 480px) {
    .calculator-section {
        padding: 1.5rem 1rem;
    }
    
    .preview-container {
        min-height: 150px;
    }
    
    .result-card {
        padding: 1rem;
    }
    
    .result-card h3 {
        font-size: 1rem;
    }
}
/* Aspect Ratio Calculator Specific Styles */
.ratio-calculator {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
}

.calculator-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 2rem;
}

.calculator-mode {
    margin-bottom: 2rem;
}

.calculator-mode h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-weight: 600;
}

.dimension-inputs {
    display: flex;
    align-items: end;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dimension-inputs .input-group {
    flex: 1;
}

.ratio-symbol {
    font-size: 1.5rem;
    font-weight: 700;
    color: #64748b;
    padding-bottom: 12px;
}

.calculate-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.preset-ratios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.ratio-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #64748b;
}

.ratio-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #f8fafc;
}

.ratio-btn.active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1e40af;
}

.custom-ratio {
    margin-bottom: 2rem;
}

.custom-ratio label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1e293b;
}

.ratio-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 200px;
}

.ratio-inputs input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
}

.ratio-inputs span {
    font-weight: 700;
    color: #64748b;
}

.target-dimension label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
    color: #1e293b;
}

.target-inputs {
    display: flex;
    gap: 1rem;
}

.target-inputs .input-group {
    flex: 1;
}

.results-section {
    border-top: 2px solid #f1f5f9;
    padding-top: 2rem;
    margin-top: 2rem;
}

.results-section h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
    font-weight: 600;
    text-align: center;
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.result-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.result-card h4 {
    margin-bottom: 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

/* Responsive Design for Aspect Ratio Calculator */
@media (max-width: 768px) {
    .ratio-calculator {
        padding: 2rem 1.5rem;
    }
    
    .calculator-tabs {
        flex-direction: column;
    }
    
    .dimension-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ratio-symbol {
        text-align: center;
        padding: 0.5rem 0;
    }
    
    .preset-ratios {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .target-inputs {
        flex-direction: column;
    }
    
    .result-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ratio-calculator {
        padding: 1.5rem 1rem;
    }
    
    .preset-ratios {
        grid-template-columns: 1fr;
    }
    
    .ratio-btn {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .result-value {
        font-size: 1.2rem;
    }
}
/* Color Picker Specific Styles */
.picker-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
}

.picker-workspace {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.image-canvas-container {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

#imageCanvas {
    max-width: 100%;
    max-height: 600px;
    cursor: crosshair;
    display: block;
}

.crosshair {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
    display: none;
    box-shadow: 0 0 0 2px white, 0 0 10px rgba(59, 130, 246, 0.5);
}

.color-info-panel {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.current-color {
    margin-bottom: 2rem;
    text-align: center;
}

.color-preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto 1rem;
    background: #ffffff;
}

.color-coordinates {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.color-values {
    margin-bottom: 2rem;
}

.value-group {
    margin-bottom: 1rem;
}

.value-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.value-display {
    display: flex;
    gap: 0.5rem;
}

.value-display input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    background: white;
}

.copy-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: #1e40af;
    transform: scale(1.05);
}

.picked-colors h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
    font-size: 1rem;
}

.color-history {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.color-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #e2e8f0;
    flex-shrink: 0;
}

.color-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1e293b;
}

.copy-color-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.copy-color-btn:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.clear-history-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.clear-history-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Responsive Design for Color Picker */
@media (max-width: 768px) {
    .picker-workspace {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .picker-section {
        padding: 2rem 1.5rem;
    }
    
    .color-info-panel {
        padding: 1.5rem;
    }
    
    .image-canvas-container {
        min-height: 300px;
    }
    
    .color-preview {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .picker-section {
        padding: 1.5rem 1rem;
    }
    
    .color-info-panel {
        padding: 1rem;
    }
    
    .image-canvas-container {
        min-height: 250px;
    }
    
    .value-display {
        flex-direction: column;
    }
    
    .copy-btn {
        align-self: flex-start;
    }
}
/* Template Tool Pages Styles */
.processing-section {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
}

.processing-content {
    text-align: center;
}

.result-placeholder {
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
}

.result-placeholder i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.result-placeholder h3 {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.result-placeholder p {
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Additional Tool-Specific Styles */
.converter-controls {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
}

.format-selector {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.format-option {
    text-align: center;
}

.format-option h3 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
}

.format-display {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.format-icon {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.format-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.2rem;
}

.conversion-arrow {
    font-size: 2rem;
    color: #3b82f6;
}

.quality-controls {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.quality-controls h4 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
}

.quality-slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quality-slider {
    flex: 1;
}

.quality-value {
    font-weight: 600;
    color: #3b82f6;
    min-width: 50px;
    text-align: center;
}

.color-input-section {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
}

.color-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.color-input-group {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.color-input-group h4 {
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-preview-large {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    margin-bottom: 1rem;
    background: #ffffff;
}

.color-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-input-row label {
    min-width: 40px;
    font-weight: 500;
    color: #64748b;
    font-size: 0.9rem;
}

.color-input-row input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

.palette-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.palette-color {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.palette-color:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.palette-swatch {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.palette-code {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.gradient-preview {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    margin: 2rem 0;
    background: linear-gradient(45deg, #3b82f6, #1e40af);
}

.gradient-controls {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.gradient-direction {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.direction-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.direction-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.direction-btn.active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1e40af;
}

.css-output {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 2rem 0;
    position: relative;
}

.css-output::before {
    content: 'CSS';
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Responsive Design for Template Tools */
@media (max-width: 768px) {
    .format-selector {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .conversion-arrow {
        transform: rotate(90deg);
    }
    
    .color-input-grid {
        grid-template-columns: 1fr;
    }
    
    .palette-display {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .gradient-direction {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .result-placeholder {
        padding: 2rem 1rem;
    }
    
    .result-placeholder i {
        font-size: 3rem;
    }
    
    .result-placeholder h3 {
        font-size: 1.2rem;
    }
    
    .format-display {
        padding: 1.5rem;
        min-height: 100px;
    }
    
    .format-icon {
        font-size: 2rem;
    }
    
    .palette-display {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Color Code Generator Specific Styles */
.color-picker-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.color-display-large {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-display-large:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.color-preview-large {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    position: relative;
}

.color-info-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 300px;
    text-align: center;
}

.current-color-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.color-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
}

.color-formats-mini {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.format-tag {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.color-input-controls {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-tabs .tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s ease;
}

.control-tabs .tab-btn.active {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.control-tabs .tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
}

.code-formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.code-format-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.code-format-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.format-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.format-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.format-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.copy-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.05);
}

.code-display {
    margin: 1rem 0;
}

.code-display code {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1rem;
    color: #1e293b;
    display: block;
    word-break: break-all;
    font-weight: 500;
}

.format-description {
    margin-top: 0.75rem;
}

.format-description small {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .color-picker-main {
        padding: 1rem;
    }
    
    .color-display-large {
        width: 100px;
        height: 100px;
    }
    
    .color-info-bar {
        min-width: auto;
        width: 100%;
    }
    
    .code-formats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .control-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .control-tabs .tab-btn {
        justify-content: center;
    }
}