/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Header and Navigation */
header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #2563eb;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #2563eb;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Tools Section */
.tools-section {
    padding: 4rem 0;
}

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

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

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.tool-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn:hover {
    background: #1d4ed8;
}

/* Features Section */
.features {
    background: white;
    padding: 4rem 0;
}

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

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

.feature {
    text-align: center;
    padding: 1.5rem;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.feature p {
    color: #6b7280;
}

/* Footer */
footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Tool Page Styles */
.tool-page {
    padding: 3rem 0;
}

.tool-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.tool-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 2rem;
}

.upload-area:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.upload-area.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

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

.file-input {
    display: none;
}

.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: #10b981;
}

.btn-success:hover {
    background: #059669;
}

.result-area {
    display: none;
    margin-top: 2rem;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 8px;
}

.result-area.active {
    display: block;
}

.preview-image {
    max-width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.tool-description {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e7eb;
}

.tool-description h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.tool-description h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.tool-description p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #4b5563;
}

.tool-description ul, .tool-description ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.tool-description li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.faq {
    margin-top: 2rem;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item h4 {
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: #6b7280;
}

/* Loading Spinner */
.spinner {
    display: none;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

.spinner.active {
    display: block;
}

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

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        gap: 1rem;
    }

    .tool-container {
        padding: 1.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    .nav-menu {
        font-size: 0.9rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h2 {
        font-size: 1.5rem;
    }
}

/* QR Code Generator Styles */
.qr-type-btn {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.qr-type-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.qr-type-btn.active {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
}

.qr-form {
    display: none;
}

.qr-form.active {
    display: block;
}

#qrCodeContainer {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrCodeContainer canvas,
#qrCodeContainer img {
    max-width: 100%;
    height: auto;
}

