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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #d4af37 0%, #c9a961 25%, #ffd700 50%, #c9a961 75%, #d4af37 100%);
    background-size: 400% 400%;
    animation: goldShimmer 8s ease infinite;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

@keyframes goldShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(to bottom, #fffef7, #fffdf0);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
    border: 2px solid #d4af37;
    overflow: hidden;
}

h1 {
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #d4af37 100%);
    background-size: 200% 200%;
    animation: goldShimmer 3s ease infinite;
    color: #3d2a00;
    padding: 30px;
    text-align: center;
    font-size: 28px;
    text-shadow: 0 2px 4px rgba(255, 215, 0, 0.3), 0 0 10px rgba(212, 175, 55, 0.5);
    border-bottom: 3px solid #c9a961;
}

h2 {
    color: #c9a961;
    margin-bottom: 20px;
    font-size: 22px;
    text-shadow: 0 1px 2px rgba(212, 175, 55, 0.3);
}

h3 {
    color: #d4af37;
    margin-bottom: 15px;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(212, 175, 55, 0.3);
}

.form-section, .result-section {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #8b7355;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #d4af37;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: linear-gradient(to bottom, #fffef7, white);
}

.form-group input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3), 0 0 5px rgba(255, 215, 0, 0.2);
}

.calc-btn, .print-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #d4af37 100%);
    background-size: 200% 200%;
    animation: goldShimmer 3s ease infinite;
    color: #3d2a00;
    border: 2px solid #c9a961;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
    text-shadow: 0 1px 2px rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.calc-btn:hover, .print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.6), 0 0 15px rgba(255, 215, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.calc-btn:active, .print-btn:active {
    transform: translateY(0);
}

.contract-details {
    background: linear-gradient(135deg, #fffef7 0%, #fffdf0 100%);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 2px solid #d4af37;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e8d9b8;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.highlight {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(255, 215, 0, 0.15) 50%, rgba(212, 175, 55, 0.15) 100%);
    padding: 12px 15px;
    margin: 5px -15px;
    border-radius: 5px;
    font-weight: 600;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.detail-row .label {
    color: #8b7355;
    font-weight: 500;
}

.detail-row .value {
    color: #5d4a2e;
    font-weight: 600;
}

hr {
    margin: 20px 0;
    border: none;
    border-top: 2px solid #d4af37;
    box-shadow: 0 1px 3px rgba(212, 175, 55, 0.3);
}

.payment-schedule {
    margin-top: 30px;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: linear-gradient(to bottom, #fffef7, white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    border: 2px solid #d4af37;
}

.schedule-table th {
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #d4af37 100%);
    color: #3d2a00;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 215, 0, 0.3);
    border-bottom: 2px solid #c9a961;
}

.schedule-table td {
    padding: 12px;
    border-bottom: 1px solid #e8d9b8;
    color: #5d4a2e;
}

.schedule-table tr:last-child td {
    border-bottom: none;
}

.schedule-table tr:nth-child(even) {
    background-color: rgba(212, 175, 55, 0.05);
}

.schedule-table tr:hover {
    background-color: rgba(255, 215, 0, 0.15);
    box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.1);
}

@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    .form-section {
        display: none;
    }

    .print-btn {
        display: none;
    }

    .result-section {
        display: block !important;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 22px;
        padding: 20px;
    }

    .form-section, .result-section {
        padding: 20px;
    }

    .detail-row {
        flex-direction: column;
        gap: 5px;
    }

    .schedule-table {
        font-size: 14px;
    }

    .schedule-table th, .schedule-table td {
        padding: 8px;
    }
}
