/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e1e1e;
    line-height: 1.6;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    text-decoration: none;
    color: #C62E2E;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-text {
    color: #C62E2E;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #1e1e1e;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #C62E2E;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #C62E2E 0%, #a02424 100%);
    color: #ffffff;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-icon {
    color: #C1E172;
    margin-top: 2rem;
}

/* Main Content */
.main {
    padding: 3rem 0;
}

/* Tool Section */
.tool-section {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #C62E2E;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background-color: #fff5f5;
    border-color: #a02424;
}

.upload-content svg {
    color: #C62E2E;
    margin-bottom: 1rem;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1e1e1e;
}

.upload-content p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.upload-note {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Editor Area */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.editor-header h3 {
    font-size: 1.5rem;
    color: #1e1e1e;
}

/* Platform Tabs */
.platform-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    max-height: 250px;
    overflow-y: auto;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.platform-tabs::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.platform-tabs::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.platform-tabs::-webkit-scrollbar-thumb {
    background: #C62E2E;
    border-radius: 4px;
}

.platform-tabs::-webkit-scrollbar-thumb:hover {
    background: #a02424;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #1e1e1e;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.tab-btn:hover {
    background-color: #e9ecef;
    border-color: #C62E2E;
}

.tab-btn.active {
    background-color: #C62E2E;
    color: #ffffff;
    border-color: #C62E2E;
}

/* Size Grid */
.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.size-card {
    background-color: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-card:hover {
    border-color: #C62E2E;
    box-shadow: 0 4px 12px rgba(198, 46, 46, 0.15);
    transform: translateY(-2px);
}

.size-card.selected {
    border-color: #C62E2E;
    background-color: #fff5f5;
}

.size-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.size-card h4 {
    font-size: 1.1rem;
    color: #1e1e1e;
    margin-bottom: 0.25rem;
}

.size-card .platform-label {
    font-size: 0.85rem;
    color: #C62E2E;
    font-weight: 600;
    text-transform: uppercase;
}

.size-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.size-dimensions {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.size-preview {
    width: 100%;
    height: 150px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
}

.size-preview canvas {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.size-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: #C62E2E;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #a02424;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 46, 46, 0.3);
}

.btn-secondary {
    background-color: #1e1e1e;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Preview Modal */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.preview-content {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s ease;
}

.preview-close:hover {
    color: #C62E2E;
}

#previewTitle {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

#previewCanvas {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.preview-controls {
    display: flex;
    gap: 1rem;
}

/* Features Section */
.features {
    margin-bottom: 4rem;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #1e1e1e;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    color: #C62E2E;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #1e1e1e;
}

.feature-card p {
    color: #6c757d;
    line-height: 1.6;
}

/* How to Use Section */
.how-to-use {
    background-color: #ffffff;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 4rem;
}

.how-to-use h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #1e1e1e;
}

.steps {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background-color: #C62E2E;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #1e1e1e;
}

.step-content p {
    color: #6c757d;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1e1e1e 0%, #000000 100%);
    color: #ffffff;
    padding: 4rem 2rem;
    border-radius: 12px;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cta-visual {
    position: absolute;
    bottom: -20px;
    right: 5%;
    opacity: 0.1;
    pointer-events: none;
}

/* Content Section */
.content-section {
    background-color: #ffffff;
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 4rem;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1e1e1e;
}

.content-section h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e1e1e;
}

.content-section p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #1e1e1e;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 4rem;
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #1e1e1e;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: #ffffff;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e1e1e;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: #C62E2E;
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: #6c757d;
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: #1e1e1e;
    color: #ffffff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: #C62E2E;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #6c757d;
    line-height: 1.6;
}

.footer-links h4 {
    margin-bottom: 1rem;
    color: #C1E172;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #C62E2E;
}

.footer-social h4 {
    margin-bottom: 1rem;
    color: #C1E172;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: #6c757d;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #C62E2E;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1.5rem;
    text-align: center;
    color: #6c757d;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .size-grid {
        grid-template-columns: 1fr;
    }

    .platform-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .tab-btn {
        white-space: nowrap;
    }

    .action-buttons {
        flex-direction: column;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .step {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .tool-section {
        padding: 1rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}