:root {
    --primary-color: #A67C52;
    --primary-dark: #8B6F47;
    --primary-light: #C8B89A;
    --success-color: #059669;
    --error-color: #dc2626;
    --text-primary: #3E3226;
    --text-secondary: #6B5D4F;
    --border-color: #E8DCC8;
    --bg-gray: #FAF8F3;
    --bg-beige: #F5F1E8;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(62, 50, 38, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(62, 50, 38, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(62, 50, 38, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(62, 50, 38, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #F5F1E8 0%, #E8DCC8 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-dark);
}

.header-content {
    animation: fadeInDown 0.6s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    opacity: 0.95;
}

/* Main Content */
.main-content {
    animation: fadeInUp 0.6s ease-out;
}

/* Card */
.card {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 2rem;
}

.card-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    background: var(--bg-gray);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #FFFBF5;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: #FFFBF5;
    transform: scale(1.02);
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.file-info {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-light);
    color: var(--white);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.15);
}

.form-group textarea {
    resize: vertical;
}

/* Checkbox Group */
.checkbox-group {
    margin-bottom: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 1rem;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.25rem;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 0.0625rem;
    width: 0.375rem;
    height: 0.625rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-color);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: var(--primary-color);
}

.radio-text {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

/* Partition Options */
.partition-options {
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-out;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    width: 100%;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

.btn-success {
    background: var(--success-color);
    color: var(--white);
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
}

.btn-success:hover {
    background: #047857;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f3f4f6;
}

/* Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    width: 1.25rem;
    height: 1.25rem;
}

.spinner .path {
    stroke: currentColor;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Progress */
.progress-container {
    margin-top: 2rem;
    animation: fadeIn 0.3s ease-out;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--bg-gray);
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 0.25rem;
    transition: width 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Result Container */
.result-container {
    margin-top: 2rem;
    animation: fadeIn 0.3s ease-out;
}

.result-success {
    text-align: center;
    padding: 2rem;
}

.result-success svg {
    color: var(--success-color);
    margin-bottom: 1rem;
}

.result-success h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.result-success p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Error Container */
.error-container {
    margin-top: 2rem;
    animation: fadeIn 0.3s ease-out;
}

.error-message {
    text-align: center;
    padding: 2rem;
}

.error-message svg {
    color: var(--error-color);
    margin-bottom: 1rem;
}

.error-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--error-color);
    margin-bottom: 0.5rem;
}

.error-message p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--white);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #A67C52 0%, #8B6F47 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--white);
}

.info-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem 0;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .logo h1 {
        font-size: 1.875rem;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

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

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

    .btn-success {
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.75rem;
    }

    .btn-secondary {
        width: 100%;
    }
}
