/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

.perde-calculator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fff9e6 0%, #fffdf5 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(218, 165, 32, 0.1);
    position: relative;
    overflow: hidden;
}

.perde-calculator-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #daa520, #ffd700, #daa520);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

/* Step Management */
.perde-step {
    display: none;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.perde-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.perde-step.slide-out-left {
    transform: translateX(-50px);
    opacity: 0;
}

.perde-step.slide-in-right {
    transform: translateX(0);
    opacity: 1;
}

/* Header Styles */
.perde-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.perde-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #daa520, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(218, 165, 32, 0.1);
}

.perde-header p {
    font-size: 1.1rem;
    color: #8b7355;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(218, 165, 32, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #daa520, #ffd700);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Calculator Grid */
.perde-calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Material Cards */
.material-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(218, 165, 32, 0.08);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.material-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.05), rgba(255, 215, 0, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.material-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(218, 165, 32, 0.15);
    border-color: rgba(218, 165, 32, 0.3);
}

.material-card:hover::before {
    opacity: 1;
}

.material-card.active {
    border-color: #daa520;
    background: linear-gradient(135deg, #fff9e6, white);
    transform: translateY(-4px);
}

.material-card.active::before {
    opacity: 1;
}

/* Material Header */
.material-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.material-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #5d4e37;
    margin: 0;
    transition: color 0.3s ease;
}

.material-card.active .material-header h3 {
    color: #daa520;
}

/* Toggle Switch */
.material-toggle {
    position: relative;
}

.material-checkbox {
    display: none;
}

.toggle-label {
    display: block;
    width: 60px;
    height: 30px;
    background: #e0e0e0;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.material-checkbox:checked + .toggle-label {
    background: linear-gradient(135deg, #daa520, #ffd700);
}

.material-checkbox:checked + .toggle-label::after {
    transform: translateX(30px);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3);
}

/* Material Inputs */
.material-inputs {
    position: relative;
    z-index: 2;
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8b7355;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.perde-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1rem;
    background: #fafafa;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.perde-input:focus {
    border-color: #daa520;
    background: white;
    box-shadow: 0 0 0 4px rgba(218, 165, 32, 0.1);
    transform: scale(1.02);
}

.perde-input:focus + .form-line {
    transform: scaleX(1);
}

/* Calculation Result */
.calculation-result {
    background: linear-gradient(135deg, #f8f6f0, #fff9e6);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    border: 1px solid rgba(218, 165, 32, 0.2);
}

.area-display, .price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.area-display:last-child, .price-display:last-child {
    margin-bottom: 0;
}

.calculation-result .label {
    font-weight: 500;
    color: #8b7355;
    font-size: 0.9rem;
}

.area, .total {
    font-weight: 700;
    color: #daa520;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* Total Section */
.total-section {
    background: linear-gradient(135deg, white, #fff9e6);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    border: 2px solid rgba(218, 165, 32, 0.2);
    position: relative;
    overflow: hidden;
}

.total-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.05), rgba(255, 215, 0, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.total-section:hover::before {
    opacity: 1;
}

.total-display {
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.total-label {
    font-size: 1.3rem;
    font-weight: 600;
    color: #8b7355;
    margin-right: 15px;
}

.total-amount {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #daa520, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(218, 165, 32, 0.1);
    transition: all 0.3s ease;
}

/* Continue Button */
.continue-btn {
    background: linear-gradient(135deg, #daa520, #b8860b);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(218, 165, 32, 0.3);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.continue-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.continue-btn:hover::before {
    left: 100%;
}

.continue-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(218, 165, 32, 0.4);
}

.continue-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.continue-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.continue-btn svg {
    transition: transform 0.3s ease;
}

.continue-btn:hover svg {
    transform: translateX(4px);
}

/* Request Summary */
.request-summary {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(218, 165, 32, 0.08);
    border: 2px solid rgba(218, 165, 32, 0.1);
}

.request-summary h3 {
    color: #daa520;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(218, 165, 32, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-total {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(218, 165, 32, 0.2);
    font-size: 1.2rem;
    color: #daa520;
}

/* Elegant Form */
.elegant-form {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 12px 48px rgba(218, 165, 32, 0.1);
    position: relative;
    overflow: hidden;
}

.elegant-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.02), rgba(255, 215, 0, 0.02));
}

.form-section {
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.form-section h3 {
    color: #daa520;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
}

.form-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #daa520, #ffd700);
    border-radius: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #8b7355;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 0 8px 0;
    border: none;
    border-bottom: 2px solid #e8e8e8;
    background: transparent;
    font-size: 1rem;
    color: #333;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    padding-top: 12px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-bottom-color: #daa520;
}

.form-group input:focus + .form-line,
.form-group select:focus + .form-line,
.form-group textarea:focus + .form-line {
    transform: scaleX(1);
}

.form-group input:focus ~ label,
.form-group select:focus ~ label,
.form-group textarea:focus ~ label {
    color: #daa520;
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #daa520, #ffd700);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.back-btn {
    background: transparent;
    color: #8b7355;
    border: 2px solid #e8e8e8;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-btn:hover {
    border-color: #daa520;
    color: #daa520;
    transform: translateX(-4px);
}

.submit-btn {
    background: linear-gradient(135deg, #daa520, #b8860b);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(218, 165, 32, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 180px;
    justify-content: center;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(218, 165, 32, 0.4);
}

.submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-loading {
    display: none;
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(40px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #daa520, #ffd700, #daa520);
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h3 {
    color: #daa520;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.modal-content p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-btn {
    background: linear-gradient(135deg, #daa520, #b8860b);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.3);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(218, 165, 32, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .perde-calculator-wrapper {
        padding: 15px;
        margin: 10px;
    }
    
    .perde-header h2 {
        font-size: 2rem;
    }
    
    .perde-calculator-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .material-card {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .back-btn,
    .submit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .elegant-form {
        padding: 25px;
    }
    
    .total-amount {
        font-size: 1.8rem;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .perde-header h2 {
        font-size: 1.6rem;
    }
    
    .total-label {
        font-size: 1.1rem;
    }
    
    .total-amount {
        font-size: 1.5rem;
    }
    
    .continue-btn {
        padding: 14px 24px;
        font-size: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus and Accessibility */
.continue-btn:focus,
.submit-btn:focus,
.back-btn:focus,
.modal-btn:focus {
    outline: 3px solid rgba(218, 165, 32, 0.3);
    outline-offset: 2px;
}

.perde-input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid rgba(218, 165, 32, 0.3);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .modal-overlay,
    .continue-btn,
    .form-actions {
        display: none !important;
    }
    
    .perde-calculator-wrapper {
        box-shadow: none;
        background: white;
    }
}
