.date-duration-calculator {
    max-width: 450px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 2em auto;
}

.date-inputs {
    margin-bottom: 20px;
}

.date-group {
    margin-bottom: 10px;
    text-align: left;
}

.date-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.date-group input[type="date"],
.date-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}

.date-group input[type="date"]:focus,
.date-group select:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.calculate-btn,
.reset-btn {
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s;
}

.calculate-btn {
    background: #007aff;
    color: white;
}

.calculate-btn:hover {
    background: #005ecb;
}

.calculate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.reset-btn {
    background: #ff3b30;
    color: white;
}

.reset-btn:hover {
    background: #d82d23;
}

/* Enhanced Result Box Styles */
.result-box {
    margin-top: 15px;
    font-size: 16px;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
}

.result-box.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.result-box.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    font-weight: bold;
}

.date-info {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.duration-warning {
    color: #ff9800;
    margin-bottom: 10px;
    font-weight: 500;
}

.duration-result {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

/* Mobile Responsiveness */
@media (min-width: 481px) {
    .date-group {
        display: grid;
        grid-template-columns: 100px 1fr 80px;
        gap: 10px;
        align-items: center;
    }

    .date-group label {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .date-duration-calculator {
        margin: 1em;
        padding: 15px;
    }

    .button-group {
        flex-direction: column;
    }

    .calculate-btn,
    .reset-btn {
        width: 100%;
    }
}

/* RTL Support */
[dir="rtl"] .date-group {
    text-align: right;
}

/* Print Styles */
@media print {
    .date-duration-calculator {
        box-shadow: none;
        border: 1px solid #000;
    }

    .button-group {
        display: none;
    }

    .result-box {
        border: 1px solid #000;
        background: none !important;
        color: #000 !important;
    }
}