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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #1a202c;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Container ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Typography ===== */
h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.3;
}

h3 {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.3;
}

/* ===== Upload Section ===== */
.upload-section {
    margin-bottom: 30px;
}

.upload-box {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    position: relative;
}

.upload-box:hover {
    border-color: #48bb78;
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.upload-box.dragover {
    border-color: #48bb78;
    background: #f0fff4;
    border-style: solid;
}

.upload-box:focus {
    outline: 3px solid #48bb78;
    outline-offset: 2px;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: #718096;
    margin: 0 auto 20px;
    transition: all 0.25s ease;
}

.upload-box:hover .upload-icon {
    color: #48bb78;
    transform: scale(1.05);
}

.upload-text {
    font-size: 1.25rem;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.4;
}

.upload-subtext {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== Buttons ===== */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.5;
}

.btn-primary {
    background: #2d3748;
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-primary:hover:not(:disabled) {
    background: #1a202c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 55, 72, 0.2);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
    margin-top: 12px;
}

.btn-secondary:hover:not(:disabled) {
    background: #cbd5e0;
}

/* ===== Loading Section ===== */
.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid #e2e8f0;
    border-top: 4px solid #48bb78;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-section p {
    color: #718096;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ===== Error Section ===== */
.error-section {
    text-align: center;
    padding: 40px 20px;
}

.error-content {
    max-width: 400px;
    margin: 0 auto;
}

.error-icon {
    width: 64px;
    height: 64px;
    color: #f56565;
    margin: 0 auto 20px;
}

#errorMessage {
    color: #c53030;
    font-size: 1.05rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ===== Result Section ===== */
.result-section {
    text-align: center;
}

.result-section h2 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 600;
}

.result-content {
    max-width: 500px;
    margin: 0 auto;
}

.preview-box {
    background: #fafafa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.preview-box img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
}

.specs {
    color: #4a5568;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.5;
}

.specs-detail {
    color: #718096;
    font-size: 0.875rem;
    font-weight: 400;
    margin-top: 6px;
    line-height: 1.5;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== Info Boxes ===== */
.requirements-box,
.info-box {
    background: #fafafa;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.requirements-box h2,
.info-box h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 500;
}

.requirements-box ul,
.info-box ul {
    list-style: none;
    padding-left: 0;
}

.requirements-box li,
.info-box li {
    padding: 10px 0;
    position: relative;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

.requirements-box li:before {
    content: "•";
    color: #718096;
    font-weight: bold;
    margin-right: 12px;
}

.info-box li:before {
    content: "✓";
    color: #48bb78;
    font-weight: bold;
    margin-right: 12px;
}

/* ===== Feedback Section ===== */
.feedback-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.feedback-section h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 500;
}

.feedback-subtitle {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.feedback-label {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    font-weight: normal;
    color: #4a5568;
}

.checkbox-label:hover {
    background-color: #f7fafc;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #48bb78;
}

.feedback-comments {
    margin-bottom: 20px;
}

.feedback-comments textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s ease;
    line-height: 1.6;
    color: #2d3748;
}

.feedback-comments textarea:focus {
    outline: none;
    border-color: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

.btn-feedback {
    background: #2d3748;
    color: white;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-feedback:hover {
    background: #1a202c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 55, 72, 0.2);
}

.feedback-success {
    margin-top: 16px;
    padding: 14px;
    background-color: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    color: #22543d;
    font-weight: 500;
    line-height: 1.5;
}

/* ===== Footer ===== */
footer {
    margin-top: 40px;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .upload-box {
        padding: 50px 30px;
    }

    .btn {
        padding: 16px 24px;
        font-size: 1rem;
    }
}

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

    .upload-box {
        padding: 40px 20px;
    }

    .upload-text {
        font-size: 1.1rem;
    }
}
