* {
    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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 1rem;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
}

.upload-section {
    padding: 2rem 1.5rem;
}

.upload-area {
    border: 3px dashed #e1e5e9;
    border-radius: 12px;
    padding: 3rem 1.5rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #4facfe;
    background: #f0f8ff;
    transform: translateY(-2px);
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    color: #4facfe;
    margin-bottom: 1rem;
    display: block;
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    font-size: 0.875rem;
    color: #718096;
}

.file-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #4facfe;
    display: none;
}

.file-info.show {
    display: block;
}

.file-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.file-size {
    font-size: 0.875rem;
    color: #718096;
}

.upload-button {
    width: 100%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    opacity: 0.5;
    pointer-events: none;
}

.upload-button.enabled {
    opacity: 1;
    pointer-events: auto;
}

.upload-button:hover.enabled {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.upload-button:active.enabled {
    transform: translateY(0);
}

/* Tablet and Desktop Styles */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
        margin: 2rem auto;
    }

    .header h1 {
        font-size: 2.25rem;
    }

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

    .upload-icon {
        font-size: 4rem;
    }

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

@media (min-width: 1024px) {
    .container {
        max-width: 700px;
    }

    .upload-area {
        padding: 5rem 3rem;
    }

    .upload-icon {
        font-size: 5rem;
    }
}

/* Analysis Results Styles */
.analysis-results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    display: none;
}

.analysis-results.show {
    display: block;
}

.analysis-results h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* Instagram Export Styles */
.instagram-export {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.instagram-export h4 {
    margin: 0 0 1rem 0;
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
}

.export-settings {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
}

.setting-group input {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
}

.setting-group input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.setting-group input::placeholder {
    color: #a0aec0;
}

.export-buttons {
    margin-bottom: 1rem;
}

.export-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.export-btn:active {
    transform: translateY(0);
}

/* Instagram Export Preview Styles */
.export-preview {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.export-preview.show {
    display: flex;
}

#exportCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    background: white;
    border: 3px solid #e2e8f0;
}

.preview-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.download-btn:active {
    transform: translateY(0);
}