/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-body: #F4F6F8;
    --bg-header: #FFFFFF;
    --text-primary: #1C1E21;
    --text-secondary: #4E5D6C;
    --btn-primary: #C8943B;
    --btn-hover: #C8943B;
    --link-color: #4A4A4A;
    --border-color: #D0D7DE;
    --highlight: #7E57C2;
    --shadow-sm: 0 2px 8px rgba(28, 30, 33, 0.1);
    --shadow-hover: 0 4px 12px rgba(28, 30, 33, 0.15);
}

[data-theme="dark"] {
    --bg-body: #0D1117;
    --bg-header: #161B22;
    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --border-color: #30363D;
    --highlight: #9B6BFF;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: all 0.3s ease;
}

h1 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-primary);
}

form {
    background: var(--bg-header);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
}

.flex {
    display: flex;
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

.items-baseline {
    align-items: baseline;
}

.formulario {
    margin-bottom: 15px;
}

.label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.join {
    display: flex;
    align-items: center;
}

input[type="time"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-header);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

input[type="time"]:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 0 3px rgba(126, 87, 194, 0.1);
}

.btn {
    background-color: var(--btn-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
}

.btn:hover {
    background-color: var(--btn-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.btn-calcular {
    background-color: #28a745;
    font-size: 16px;
    padding: 12px;
}

.btn-calcular:hover {
    background-color: #218838;
}

.btn-adicionar {
    background-color: var(--btn-primary);
}

.btn-remover {
    width: auto;
    padding: 8px 12px;
    margin-left: 10px;
    margin-top: 28px;
    background-color: #dc3545;
}

.btn-remover:hover {
    background-color: #c82333;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.horario-linha {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.horario-linha:last-child {
    border-bottom: none;
}

.horario-grupo {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.horario-grupo .formulario {
    flex: 1;
}

.input-time {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-body);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.input-time:focus {
    outline: none;
    border-color: var(--highlight);
    box-shadow: 0 0 0 3px rgba(126, 87, 194, 0.1);
}

.resultado {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-body);
    border-radius: 8px;
    border: 2px solid var(--highlight);
    text-align: center;
}

.resultado h2 {
    color: var(--highlight);
    margin-bottom: 10px;
    font-size: 20px;
}

.resultado p {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
}

footer {
    margin-top: 30px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 600px) {
    form {
        padding: 15px;
    }

    .btn {
        padding: 8px 16px;
    }

    .horario-grupo {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-remover {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }

    .container {
        padding: 10px;
    }
}