body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
    background-color: #f9f9f9;
}

button {
    font-family: inherit;
}

.setup-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

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

.input-group label {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
}

.math-var {
    font-family: 'Crimson Text', serif;
    font-style: italic;
    font-size: 1.15em;
    padding-right: 0.1em;
}

input[type="number"] {
    padding: 8px;
    font-size: 1rem;
    width: 70px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#vector-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
    justify-content: center;
}

.vector-wrapper-input {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vector-column {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    background-color: #fff;
    padding: 8px;
}

/* Square Bracket Styling for Input Vectors */
.vector-column::before,
.vector-column::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    border: 2px solid #333;
    pointer-events: none;
}

.vector-column::before {
    left: 0;
    border-right: none;
}

.vector-column::after {
    right: 0;
    border-left: none;
}

.cell-input {
    width: 45px;
    text-align: center;
    font-family: 'Crimson Text', serif;
    font-size: 1.25em;
    /* Slightly increased for readability */
    border: 1px solid #eee;
    border-radius: 3px;
    padding: 5px;
}

.cell-input:focus {
    border-color: #007bff;
    outline: none;
    background: #f0f8ff;
}

.vector-label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

.action-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    cursor: pointer;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    margin-top: 50px;
    font-weight: bold;
}

.action-btn:hover {
    background: #218838;
}

.results-wrapper {
    display: none;
}

.result-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.basis-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.vector-wrapper {
    display: inline-block;
    position: relative;
    padding: 5px;
    text-align: center;
    background: #fff;
}

.vector-wrapper::before,
.vector-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    border: 2px solid #333;
    pointer-events: none;
}

.vector-wrapper::before {
    left: 0;
    border-right: none;
}

.vector-wrapper::after {
    right: 0;
    border-left: none;
}

.vector-num {
    display: block;
    padding: 2px 8px;
    font-family: 'Crimson Text', serif;
    font-size: 1.15em;
    font-weight: 600;
}

.error {
    color: #d9534f;
    border-left: 5px solid #d9534f;
    padding: 15px;
    background: white;
    margin-top: 20px;
    display: none;
}

.secondary-btn {
    padding: 8px 15px;
    font-size: 1rem;
    cursor: pointer;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
    height: fit-content;
    align-self: flex-end;
    margin-bottom: 2px;
}

.secondary-btn:hover {
    background: #5a6268;
}

.danger-btn {
    padding: 8px 15px;
    font-size: 1rem;
    cursor: pointer;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
    height: fit-content;
    align-self: flex-end;
    margin-bottom: 2px;
}

.danger-btn:hover {
    background: #c82333;
}

.subtitle {
    color: #666;
    margin-top: -15px;
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.5;
}

.footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    padding-bottom: 20px;
}

.footer p {
    margin-bottom: 5px;
}

.footer a {
    color: #555;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 600;
    transition: color 0.2s;
}

.footer a:hover {
    color: #007bff;
    text-decoration: underline;
}

.creator-link {
    color: #555;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.2s, text-decoration 0.2s;
}

.creator-link:hover {
    color: #007bff !important;
    /* Forces the blue color */
    text-decoration: underline !important;
}
