/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #00a86b 0%, #00d084 100%);
    color: white;
    text-align: center;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    height: 140px;
    width: 140px;
    filter: brightness(0) invert(1); /* Makes logo white */
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Responsive logo sizes */
@media (max-width: 768px) {
    .logo {
        height: 100px;
        width: 100px;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 80px;
        width: 80px;
    }
}

.header::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"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="90" r="2.5" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    opacity: 0.95;
}

.cta-button {
    background: #000;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.cta-button:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Main Content */
.main-content {
    background: #f8f9fa;
    padding: 40px 0;
}

.upload-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.upload-card {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-card:hover {
    border-color: #00a86b;
    background: #f0fff4;
}

.upload-card h3 {
    color: #000;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.upload-area {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-content {
    width: 100%;
}

.file-input-wrapper {
    margin-bottom: 15px;
}

.file-input {
    display: none;
}

.upload-btn {
    background: #006644;
    color: white;
    border: 2px solid #004d33;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.upload-btn:hover {
    background: #00d084;
    transform: translateY(-1px);
}

.file-status {
    color: #666;
    font-size: 0.9rem;
}

.url-input-wrapper {
    margin-bottom: 20px;
}

.url-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.url-input:focus {
    outline: none;
    border-color: #00a86b;
}

.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.drop-zone:hover {
    border-color: #00a86b;
    background: #f0fff4;
}

.drop-icon { 
    font-size: 2rem; 
    margin-bottom: 10px; 
    color: #00a86b;
}

.drop-zone p {
    color: #666;
    font-size: 0.9rem;
}

.image-preview {
    margin-top: 20px;
    max-height: 200px;
    overflow: hidden;
    border-radius: 8px;
    display: none;
}

.image-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Options Section */
.options-section {
    margin-bottom: 40px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.options-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.options-card h3 {
    color: #000;
    margin-bottom: 25px;
    font-size: 1.2rem;
    font-weight: 600;
}

.option-group {
    margin-bottom: 25px;
}

.option-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.toggle-buttons {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ddd;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.toggle-btn.active {
    background: #006644;
    color: white;
    border-color: #004d33;
}

.toggle-btn:hover:not(.active) {
    border-color: #00a86b;
    color: #00a86b;
}

.select-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.select-input:focus {
    outline: none;
    border-color: #00a86b;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #00a86b;
}

.checkbox-label:hover input[type="checkbox"] {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.border-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.border-controls label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.number-input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: center;
}

.number-input:focus {
    outline: none;
    border-color: #00a86b;
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-preview {
    width: 60px;
    height: 60px;
    border: 3px solid #ddd;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-preview:hover {
    border-color: #00a86b;
}

.color-input {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0;
    position: absolute;
}

.color-values {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-value-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-value-group label {
    width: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.color-text-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.color-text-input:focus {
    outline: none;
    border-color: #00a86b;
}

/* Merge Button */
.merge-section {
    text-align: center;
    margin: 40px 0;
}

.merge-button {
    background: linear-gradient(135deg, #00a86b 0%, #00d084 100%);
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 168, 107, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 auto;
}

.merge-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 168, 107, 0.4);
}

.merge-button:active {
    transform: translateY(-1px);
}

.merge-button i { margin-right: 10px; }

/* Output Section */
.output-section {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.output-section h3 {
    color: #000;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.output-container {
    text-align: center;
}

.privacy-note {
    margin-top: 12px;
    color: #495057;
    font-size: 0.95rem;
}

#output-canvas {
    max-width: 100%;
    height: auto;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    margin-bottom: 20px;
}

.output-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.download-btn {
    background: #00a86b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #00d084;
    transform: translateY(-1px);
}

.reset-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* How It Works Section */
.how-it-works {
    background: white;
    padding: 60px 0;
    margin: 40px 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.how-it-works h2 {
    text-align: center;
    color: #000;
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 700;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
    padding: 30px 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00a86b 0%, #00d084 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    color: #000;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.step p {
    color: #666;
    line-height: 1.6;
}

/* Why Use Section */
.why-use {
    background: #f8f9fa;
    padding: 60px 0;
    margin: 40px 0;
    border-radius: 15px;
}

.why-use h2 {
    text-align: center;
    color: #000;
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 700;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.benefit {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.benefit:hover {
    transform: translateY(-5px);
}

.benefit-icon { font-size: 2rem; color: #00a86b; margin-bottom: 10px; }

.benefit h3 {
    color: #000;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.benefit p {
    color: #666;
    line-height: 1.6;
}

/* Use Cases Section */
.use-cases {
    background: white;
    padding: 60px 0;
    margin: 40px 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.use-cases h2 {
    text-align: center;
    color: #000;
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 700;
}

.cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.case {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #00a86b;
    color: #333;
    font-weight: 500;
}

/* File Types Section */
.file-types {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin: 40px 0;
}

.file-types h3 {
    color: #000;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.file-types p {
    color: #666;
    font-size: 1.1rem;
}

/* FAQ Section */
.faq {
    background: white;
    padding: 60px 0;
    margin: 40px 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.faq h2 {
    text-align: center;
    color: #000;
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 700;
}

.faq-items {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    background: #f8f9fa;
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    color: #000;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #e9ecef;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-answer {
    padding: 20px;
    color: #666;
    line-height: 1.6;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Footer */
.footer {
    background: #000;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00a86b;
}

.footer-copyright p {
    color: #999;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .upload-grid {
        grid-template-columns: 1fr;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .benefits {
        grid-template-columns: 1fr;
    }
    
    .cases {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .merge-button {
        font-size: 1.2rem;
        padding: 15px 30px;
    }
    
    .output-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .upload-section {
        padding: 20px;
    }
    
    .upload-card {
        padding: 20px;
    }
    
    .options-card {
        padding: 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .how-it-works h2,
    .why-use h2,
    .faq h2 {
        font-size: 2rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00a86b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Animation */
.success {
    color: #00a86b;
    font-weight: 600;
}

/* Error States */
.error {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 5px;
}

.error-border {
    border-color: #dc3545 !important;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #00a86b;
    outline-offset: 2px;
}
