/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    margin-bottom: 30px;
    padding-top: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    flex-shrink: 0;
}

.logo-img {
    height: 50px;
    width: auto;
}

.header-text {
    flex: 1;
    text-align: left;
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #e9b116 0%, #f8d208 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.header-text p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Tool Navigation */
.tool-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #ddd;
}

.nav-btn {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.nav-btn:hover {
    border-color: #e9b116;
    color: #e9b116;
    background: #fff8e1;
    transform: translateY(-2px);
}

.nav-btn.active {
    background: linear-gradient(135deg, #e9b116 0%, #f8d208 100%);
    color: white;
    border-color: #e9b116;
    box-shadow: 0 4px 15px rgba(233, 177, 22, 0.3);
}

/* Tool Sections */
.tool-sections {
    margin-bottom: 60px;
}

.tool-section {
    display: none;
    animation: fadeInUp 0.6s ease forwards;
}

.tool-section.active {
    display: block;
}

/* Tool Cards */
.tool-card {
    background: #fff;
    padding: 2rem;
    padding-top: 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-top-color: #f8d208;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

.tool-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1rem 0;
    color: #333;
}

.tool-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Upload Areas */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
}

.upload-area:hover {
    border-color: #e9b116;
    background: #fff8e1;
    transform: scale(1.02);
}

.upload-area.dragover {
    border-color: #e9b116;
    background: #fff8e1;
    transform: scale(1.02);
}

.upload-content {
    color: #666;
}

.upload-content svg {
    margin-bottom: 20px;
    color: #e9b116;
    width: 60px;
    height: 60px;
}

.upload-content p {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
}

/* Preview Areas */
.preview-area {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

#dataUriImage, #converterImage, #paletteImage, #metadataImage, #base64EncodeImage, #base64DecodeImage {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.result-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#dataUriResult, #base64Result, #base64Input {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    resize: vertical;
    background: #f8f9fa;
    color: #333;
}

#dataUriResult:focus, #base64Result:focus, #base64Input:focus {
    outline: none;
    border-color: #e9b116;
    box-shadow: 0 0 0 3px rgba(233, 177, 22, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #e9b116 0%, #f8d208 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(233, 177, 22, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 177, 22, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #333;
    border: 2px solid #e9b116;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e9b116 0%, #f8d208 100%);
    color: white;
    transform: translateY(-2px);
}

/* Crop Controls */
.crop-controls {
    margin-bottom: 2rem;
}

.size-presets, .custom-size {
    margin-bottom: 1.5rem;
}

.size-presets h3, .custom-size h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preset-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.preset-btn:hover {
    border-color: #e9b116;
    color: #e9b116;
    background: #fff8e1;
    transform: translateY(-2px);
}

.preset-btn.active {
    background: linear-gradient(135deg, #e9b116 0%, #f8d208 100%);
    color: white;
    border-color: #e9b116;
}

.size-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.size-inputs input {
    width: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #333;
}

.size-inputs input:focus {
    outline: none;
    border-color: #e9b116;
    box-shadow: 0 0 0 3px rgba(233, 177, 22, 0.1);
}

.size-inputs span {
    color: #666;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Canvas Container */
.canvas-container {
    margin: 2rem 0;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #ddd;
}

#cropCanvas, #watermarkCanvas {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto;
}

/* Download Section */
.download-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1.5rem 0 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#imageFormat {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
}

#imageFormat:focus {
    outline: none;
    border-color: #e9b116;
    box-shadow: 0 0 0 3px rgba(233, 177, 22, 0.1);
}

/* Format Converter Styles */
.converter-controls {
    margin-bottom: 2rem;
}

.format-selection, .quality-control {
    margin-bottom: 1.5rem;
}

.format-selection h3, .quality-control h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.format-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.format-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.format-btn:hover {
    border-color: #e9b116;
    color: #e9b116;
    background: #fff8e1;
    transform: translateY(-2px);
}

.format-btn.active {
    background: linear-gradient(135deg, #e9b116 0%, #f8d208 100%);
    color: white;
    border-color: #e9b116;
}

.quality-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.quality-control input[type="range"] {
    flex: 1;
    min-width: 200px;
}

.quality-control span {
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

.file-info {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: #666;
}

/* Compressor Styles */
.compression-controls {
    margin-bottom: 2rem;
}

.compression-level, .max-dimensions {
    margin-bottom: 1.5rem;
}

.compression-level h3, .max-dimensions h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.compression-level {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.compression-level input[type="range"] {
    flex: 1;
    min-width: 200px;
}

.compression-level span {
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

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

.dimension-inputs input {
    width: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #333;
}

.dimension-inputs input:focus {
    outline: none;
    border-color: #e9b116;
    box-shadow: 0 0 0 3px rgba(233, 177, 22, 0.1);
}

.dimension-inputs span {
    color: #666;
    font-weight: 600;
    font-size: 1.1rem;
}

.comparison-container {
    margin: 2rem 0;
}

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

.original-image, .compressed-image {
    text-align: center;
}

.original-image h4, .compressed-image h4 {
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.original-image img, .compressed-image img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    margin-bottom: 1rem;
}

.image-stats {
    font-size: 0.9rem;
    color: #666;
}

.compression-ratio {
    text-align: center;
    font-weight: 600;
    color: #333;
    margin-top: 1rem;
}

/* Color Palette Styles */
.palette-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.color-swatch {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.color-swatch.selected {
    border-color: #e9b116;
    box-shadow: 0 0 0 3px rgba(233, 177, 22, 0.3);
}

.color-codes h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

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

.color-code {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

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

/* Metadata Styles */
.metadata-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.metadata-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #ddd;
}

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

.metadata-label {
    font-weight: 600;
    color: #333;
}

.metadata-value {
    color: #666;
}

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

/* Base64 Styles */
.base64-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-btn:hover {
    border-color: #e9b116;
    color: #e9b116;
    background: #fff8e1;
}

.tab-btn.active {
    background: linear-gradient(135deg, #e9b116 0%, #f8d208 100%);
    color: white;
    border-color: #e9b116;
}

.tab-content {
    display: none;
}

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

.base64-input-area {
    margin-bottom: 2rem;
}

.base64-input-area h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

/* Format Toggle Styles */
.format-toggle {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.format-toggle label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #333;
}

.format-toggle input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.format-toggle input[type="radio"]:checked + span {
    color: #e9b116;
    font-weight: 600;
}

/* Watermark Styles */
.watermark-controls {
    margin-bottom: 2rem;
}

.watermark-type, .text-controls, .image-controls, .position-controls, .transparency-control {
    margin-bottom: 1.5rem;
}

.watermark-type h3, .position-controls h3, .transparency-control h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.type-buttons, .position-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.type-btn, .position-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.type-btn:hover, .position-btn:hover {
    border-color: #e9b116;
    color: #e9b116;
    background: #fff8e1;
    transform: translateY(-2px);
}

.type-btn.active, .position-btn.active {
    background: linear-gradient(135deg, #e9b116 0%, #f8d208 100%);
    color: white;
    border-color: #e9b116;
}

.text-input, .image-input {
    margin-bottom: 1rem;
}

.text-input label, .image-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.text-input input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #333;
}

.text-input input[type="text"]:focus {
    outline: none;
    border-color: #e9b116;
    box-shadow: 0 0 0 3px rgba(233, 177, 22, 0.1);
}

.text-styling {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.style-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.style-control label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.style-control input[type="range"] {
    flex: 1;
    min-width: 150px;
}

.style-control span {
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

.style-control input[type="color"] {
    width: 50px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
}

.image-sizing {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.image-sizing label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.image-sizing input[type="range"] {
    flex: 1;
    min-width: 150px;
}

.image-sizing span {
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

.transparency-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.transparency-control input[type="range"] {
    flex: 1;
    min-width: 200px;
}

.transparency-control span {
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

.watermark-preview {
    margin: 2rem 0;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #ddd;
}

/* Favicon Generator Styles */
.favicon-controls {
    margin-bottom: 2rem;
}

.favicon-type, .color-controls, .letter-controls, .size-controls {
    margin-bottom: 1.5rem;
}

.favicon-type h3, .color-controls h3, .letter-controls h3, .size-controls h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 600;
}

.shape-btn, .content-btn, .border-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.shape-btn:hover, .content-btn:hover, .border-btn:hover {
    border-color: #e9b116;
    color: #e9b116;
    background: #fff8e1;
    transform: translateY(-2px);
}

.shape-btn.active, .content-btn.active, .border-btn.active {
    background: linear-gradient(135deg, #e9b116 0%, #f8d208 100%);
    color: white;
    border-color: #e9b116;
}

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

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

.color-input label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.color-input input[type="color"] {
    width: 60px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
}

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

.letter-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.letter-input label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.letter-input input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    width: 60px;
}

.letter-input select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.size-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.size-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.size-options input[type="radio"] {
    margin: 0;
}

.favicon-preview {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.favicon-preview h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

#faviconCanvas {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: white;
}

/* Icon picker styles */
.icon-controls {
    margin-bottom: 1.5rem;
}

.icon-inputs {
    display: grid;
    gap: 1rem;
}

.icon-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.icon-input label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.icon-input input[type="text"] {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.icon-input input[type="text"]:focus {
    outline: none;
    border-color: #e9b116;
    box-shadow: 0 0 0 3px rgba(233, 177, 22, 0.1);
}

.icon-picker {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: #f8f9fa;
    max-height: 300px;
    overflow-y: auto;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
}

.icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-size: 1.2rem;
    color: #666;
}

.icon-item:hover {
    border-color: #e9b116;
    background: #fff8e1;
    color: #e9b116;
    transform: scale(1.1);
}

.icon-item.selected {
    border-color: #e9b116;
    background: #e9b116;
    color: white;
    transform: scale(1.1);
}

.icon-item i {
    pointer-events: none;
}

/* Responsive design for favicon generator */
@media (max-width: 768px) {
    .color-inputs, .letter-inputs, .icon-inputs {
        flex-direction: column;
        gap: 1rem;
    }
    
    .size-options {
        justify-content: center;
    }
    
    .shape-btn, .content-btn, .border-btn {
        width: 100%;
        margin-right: 0;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    }
    
    .icon-item {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Footer */
footer {
    text-align: center;
    color: #666;
    margin-top: 60px;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

footer p {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .header-text {
        text-align: center;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .tool-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .preset-buttons, .format-buttons, .type-buttons, .position-buttons {
        justify-content: center;
    }
    
    .size-inputs, .dimension-inputs {
        justify-content: center;
    }
    
    .download-section {
        flex-direction: column;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .image-comparison, .palette-container, .metadata-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .text-styling {
        flex-direction: column;
        gap: 1rem;
    }
    
    .style-control, .image-sizing, .transparency-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-section {
    animation: fadeInUp 0.6s ease forwards;
}

.preview-area {
    animation: fadeInUp 0.4s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

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

/* Success feedback */
.success {
    background: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

/* Error states */
.error {
    border-color: #f5c6cb !important;
    background: #f8d7da !important;
    color: #721c24 !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}
