* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f1f2f8;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 600px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 25px;
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

.input-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #667eea 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.result-card {
    background: linear-gradient(135deg, #93dafb 0%, #6081ed 100%);
    border-radius: 15px;
    padding: 15px;
    margin-top: 10px;
    color: white;
    text-align: center;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.result-date {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0px 0;
}

.result-details {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.result-details p {
    margin: 8px 0;
    font-size: 1rem;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 25px;
        border-radius: 15px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .input-card {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        padding: 15px;
    }

    .result-card {
        padding: 20px;
    }

    .result-card h3 {
        font-size: 1.4rem;
    }

    .result-date {
        font-size: 2rem;
    }

    .result-details p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.4rem;
    }

    .result-card h3 {
        font-size: 1.2rem;
    }

    .result-date {
        font-size: 1.8rem;
    }
}

/* Estilos para o histórico */
.history-section {
    margin-top: 30px;
    animation: slideIn 0.5s ease;
}

.history-footer {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.btn-clear-history {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: #ff6b6b;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-clear-history:hover {
    background: #ee5a5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.table-container {
    overflow-x: auto;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#historyTable {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

#historyTable thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#historyTable th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

#historyTable tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

#historyTable tbody tr:hover {
    background-color: #f8f9fa;
}

#historyTable tbody tr:last-child {
    border-bottom: none;
}

#historyTable td {
    padding: 12px 15px;
    color: #333;
    font-size: 0.9rem;
}

#historyTable tbody tr:nth-child(odd) {
    background-color: #fafafa;
}

/* Responsividade para a tabela */
@media (max-width: 768px) {
    .btn-clear-history {
        width: 100%;
    }

    .table-container {
        padding: 15px;
    }

    #historyTable th,
    #historyTable td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    #historyTable th,
    #historyTable td {
        padding: 8px 5px;
        font-size: 0.75rem;
    }

    .history-header h2 {
        font-size: 1.2rem;
    }
}
