body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #1a1a1a;
    color: #e0e0e0;
    font-size: 16px;
}

h1, h2 {
    color: #ffffff;
    font-size: 28px;
}

#global-settings {
    margin-bottom: 20px;
    background-color: #262626;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

#global-settings label {
    display: flex;
    align-items: center;
    margin: 0;
    font-weight: bold;
    color: #e0e0e0;
    font-size: 16px;
}

#global-settings input {
    margin-left: 8px;
    padding: 6px 8px;
    border: 1px solid #555;
    border-radius: 3px;
    background-color: #2a2a2a;
    color: #ffffff;
    width: 80px;
    font-size: 16px;
}

#actions {
    margin-bottom: 20px;
}

#legend {
    margin-bottom: 20px;
    padding: 12px;
    background-color: #262626;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 14px;
    color: #b0b0b0;
}

button {
    margin-right: 10px;
    padding: 10px 15px;
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
}

.filament-cell {
    position: relative;
}

.filament-length.preset-density {
    color: #4caf50;
}

.filament-length.custom-density {
    color: #ff9800;
}

.filament-length.default-density {
    color: #2196f3;
}

.density-edit-btn {
    margin: 0 0 0 5px;
    padding: 4px 8px;
    font-size: 14px;
    background-color: #444;
    border: 1px solid #666;
}

.density-edit-btn:hover {
    background-color: #555;
}

.input-density {
    width: 60px;
    margin-left: 5px;
    padding: 4px 6px;
    background-color: #2a2a2a;
    color: #ffffff;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 14px;
}

table {
    border-collapse: collapse;
    width: 100%;
    background-color: #262626;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border-radius: 5px;
    overflow: hidden;
}

th, td {
    border: 1px solid #333;
    padding: 12px;
    text-align: center;
    white-space: nowrap;
    font-size: 16px;
}

th {
    background-color: #333333;
    color: #ffffff;
    font-weight: bold;
    font-size: 17px;
}

input[type="number"] {
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid #555;
    border-radius: 3px;
    background-color: #2a2a2a;
    color: #ffffff;
    -moz-appearance: textfield;
    font-size: 16px;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="text"] {
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid #555;
    border-radius: 3px;
    background-color: #2a2a2a;
    color: #ffffff;
    font-size: 16px;
}

.input-name {
    width: 120px;
}

.material-cell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-material {
    width: 100px;
    padding: 6px;
    border: 1px solid #555;
    border-radius: 3px;
    background-color: #2a2a2a;
    color: #ffffff;
    font-size: 14px;
}

.input-material.material-preset {
    color: #4caf50;
    font-weight: 500;
}

.input-material-custom {
    width: 100px;
    padding: 6px;
    background-color: #2a2a2a;
    color: #ff9800;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
}

.input-price {
    width: 80px;
}

.input-weight {
    width: 80px;
}

.input-time {
    width: 60px;
}

textarea {
    width: 100%;
    height: 100px;
    margin-top: 10px;
    padding: 5px;
    border: 1px solid #555;
    border-radius: 3px;
    background-color: #2a2a2a;
    color: #ffffff;
}

.action-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 18px;
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    transition: transform 0.2s, background-color 0.2s;
}

.action-btn:hover {
    background-color: #444;
    transform: scale(1.1);
}

#table-container {
    overflow-x: auto;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    #global-settings {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    #global-settings label {
        margin: 0;
        font-size: 13px;
    }

    #global-settings input {
        width: 100px;
    }

    #actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    button {
        padding: 10px 15px;
        font-size: 16px;
    }

    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    th, td {
        padding: 8px 4px;
        font-size: 12px;
    }

    .input-name {
        width: 100px;
    }

    .input-material {
        width: 80px;
    }

    .input-material-custom {
        width: 80px;
    }

    .input-price,
    .input-weight {
        width: 70px;
    }

    .input-time {
        width: 50px;
    }
}